mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Made it so vterm stops auto scrolling if user interrupts.
This commit is contained in:
parent
35047e062a
commit
6ecf6285b9
@ -292,7 +292,7 @@ $( document ).ready(function() {
|
||||
location.reload()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (webSocket) {
|
||||
webSocket.on('update_button_status', function (updateButton) {
|
||||
var id = 'controls';
|
||||
|
@ -151,9 +151,13 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function new_line_handler(data) {
|
||||
$('#virt_console').append(data.line)
|
||||
if (!$("#stop_scroll").is(':checked')) {
|
||||
const elem = document.getElementById('virt_console');
|
||||
const scrollDiff = (elem.scrollHeight - elem.scrollTop) - elem.clientHeight;
|
||||
if (!$("#stop_scroll").is(':checked') && scrollDiff < 450) {
|
||||
scrollConsole()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user