update files

This commit is contained in:
nuintun 2016-01-14 15:55:41 +08:00
parent a03381aad6
commit 42e4d54da2

View File

@ -34,15 +34,15 @@ function clone(projects, index){
/** /**
* srcoll * srcoll
* @param xterm * @param xterm
* @param parent * @param y
*/ */
function scroll(xterm, parent){ function scroll(xterm, y){
var height = (xterm.y + 2) * 18; var height = (y + 2) * 18;
var scrollTop = parent.scrollTop; var scrollTop = xterm.scrollTop;
var viewHeight = parent.clientHeight; var viewHeight = xterm.clientHeight;
if (scrollTop > height || height > scrollTop + viewHeight) { 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) { } else if (event.data.screen && !document.hidden) {
vm.$els.terminal.innerHTML = event.data.screen; vm.$els.terminal.innerHTML = event.data.screen;
} }
} }
}); });