Holding down on tab change buttons will scroll.

Hide loading stats when there's only one input
This commit is contained in:
j433866 2019-06-04 11:42:27 +01:00
parent 15b5cf7c20
commit 99e9df0211
3 changed files with 99 additions and 9 deletions

View file

@ -773,7 +773,47 @@ class OutputWaiter {
} else if (wheelEvent.deltaY < 0) {
this.changeTabRight();
}
}
/**
* Handler for mouse down on the next tab button
*/
nextTabClick() {
this.mousedown = true;
this.changeTabRight();
const time = 200;
const func = function(time) {
if (this.mousedown) {
this.changeTabRight();
const newTime = (time > 50) ? time = time - 10 : 50;
setTimeout(func.bind(this, [newTime]), newTime);
}
};
setTimeout(func.bind(this, [time]), time);
}
/**
* Handler for mouse down on the previous tab button
*/
previousTabClick() {
this.mousedown = true;
this.changeTabLeft();
const time = 200;
const func = function(time) {
if (this.mousedown) {
this.changeTabLeft();
const newTime = (time > 50) ? time = time - 10 : 50;
setTimeout(func.bind(this, [newTime]), newTime);
}
};
setTimeout(func.bind(this, [time]), time);
}
/**
* Handler for mouse up event on the tab buttons
*/
tabMouseUp() {
this.mousedown = false;
}
/**