mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Make input and output tab areas scrollable
This commit is contained in:
parent
f5cf7bb1f2
commit
2575a762e1
3 changed files with 37 additions and 3 deletions
|
@ -51,7 +51,7 @@ class OutputWaiter {
|
|||
* @returns {string | ArrayBuffer}
|
||||
*/
|
||||
getOutput(inputNum, raw=true) {
|
||||
if (this.outputs[inputNum] === undefined || this.outputs[inputNum] === null) return -1;
|
||||
if (!this.outputExists(inputNum)) return -1;
|
||||
|
||||
if (this.outputs[inputNum].data === null) return "";
|
||||
|
||||
|
@ -740,7 +740,7 @@ class OutputWaiter {
|
|||
}
|
||||
}
|
||||
|
||||
this.set(inputNum);
|
||||
this.app.debounce(this.set, 50, "setOutput", this, [inputNum])();
|
||||
|
||||
if (changeInput) {
|
||||
this.manager.input.changeTab(inputNum, false);
|
||||
|
@ -760,6 +760,22 @@ class OutputWaiter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for scrolling on the output tabs area
|
||||
*
|
||||
* @param {event} wheelEvent
|
||||
*/
|
||||
scrollTab(wheelEvent) {
|
||||
wheelEvent.preventDefault();
|
||||
|
||||
if (wheelEvent.deltaY > 0) {
|
||||
this.changeTabLeft();
|
||||
} else if (wheelEvent.deltaY < 0) {
|
||||
this.changeTabRight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for changing to the left tab
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue