mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Added callback for log close animation, on close the log now scrolls to the most recent log entry.
This commit is contained in:
parent
7ca376926a
commit
e6579a9fbe
1 changed files with 7 additions and 4 deletions
11
main.js
11
main.js
|
@ -315,13 +315,16 @@ $(document).ready(function () {
|
||||||
$("#showlog").on('click', function() {
|
$("#showlog").on('click', function() {
|
||||||
var state = $(this).data('state');
|
var state = $(this).data('state');
|
||||||
if ( state ) {
|
if ( state ) {
|
||||||
$("#log").animate({height: 27}, 200);
|
$("#log").animate({height: 27}, 200, function() {
|
||||||
|
var command_log = $('div#log');
|
||||||
|
command_log.scrollTop($('div.wrapper', command_log).height());
|
||||||
|
});
|
||||||
$("#log").removeClass('active');
|
$("#log").removeClass('active');
|
||||||
$("#content").removeClass('logopen');
|
$("#content").removeClass('logopen');
|
||||||
$(".tab_container").removeClass('logopen');
|
$(".tab_container").removeClass('logopen');
|
||||||
$("#scrollicon").removeClass('active');
|
$("#scrollicon").removeClass('active');
|
||||||
chrome.storage.local.set({'logopen': false});
|
chrome.storage.local.set({'logopen': false});
|
||||||
|
|
||||||
state = false;
|
state = false;
|
||||||
}else{
|
}else{
|
||||||
$("#log").animate({height: 111}, 200);
|
$("#log").animate({height: 111}, 200);
|
||||||
|
@ -329,7 +332,7 @@ $(document).ready(function () {
|
||||||
$("#content").addClass('logopen');
|
$("#content").addClass('logopen');
|
||||||
$(".tab_container").addClass('logopen');
|
$(".tab_container").addClass('logopen');
|
||||||
$("#scrollicon").addClass('active');
|
$("#scrollicon").addClass('active');
|
||||||
chrome.storage.local.set({'logopen': true});
|
chrome.storage.local.set({'logopen': true});
|
||||||
|
|
||||||
state = true;
|
state = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue