1
0
Fork 0
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:
NightHawk32 2015-11-25 16:51:50 -05:00
parent 7ca376926a
commit e6579a9fbe

View file

@ -315,12 +315,15 @@ $(document).ready(function () {
$("#showlog").on('click', function() {
var state = $(this).data('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');
$("#content").removeClass('logopen');
$(".tab_container").removeClass('logopen');
$("#scrollicon").removeClass('active');
chrome.storage.local.set({'logopen': false});
chrome.storage.local.set({'logopen': false});
state = false;
}else{
@ -329,7 +332,7 @@ $(document).ready(function () {
$("#content").addClass('logopen');
$(".tab_container").addClass('logopen');
$("#scrollicon").addClass('active');
chrome.storage.local.set({'logopen': true});
chrome.storage.local.set({'logopen': true});
state = true;
}