mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 03:14:07 +08:00
update files
This commit is contained in:
parent
a03381aad6
commit
42e4d54da2
@ -34,15 +34,15 @@ function clone(projects, index){
|
||||
/**
|
||||
* srcoll
|
||||
* @param xterm
|
||||
* @param parent
|
||||
* @param y
|
||||
*/
|
||||
function scroll(xterm, parent){
|
||||
var height = (xterm.y + 2) * 18;
|
||||
var scrollTop = parent.scrollTop;
|
||||
var viewHeight = parent.clientHeight;
|
||||
function scroll(xterm, y){
|
||||
var height = (y + 2) * 18;
|
||||
var scrollTop = xterm.scrollTop;
|
||||
var viewHeight = xterm.clientHeight;
|
||||
|
||||
if (scrollTop > height || height > scrollTop + viewHeight) {
|
||||
parent.scrollTop = Math.max(0, height - viewHeight);
|
||||
xterm.scrollTop = Math.max(0, height - viewHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,6 @@ function openXTerm(vm){
|
||||
} else if (event.data.screen && !document.hidden) {
|
||||
vm.$els.terminal.innerHTML = event.data.screen;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user