mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Fix tab bar shadows appearing when they shouldn't
This commit is contained in:
parent
507c951f28
commit
36abaeb6fb
3 changed files with 18 additions and 10 deletions
|
@ -217,9 +217,13 @@ class OutputWaiter {
|
|||
*/
|
||||
removeAllOutputs() {
|
||||
this.outputs = {};
|
||||
const tabs = document.getElementById("output-tabs").children;
|
||||
for (let i = tabs.length - 1; i >= 0; i--) {
|
||||
tabs.item(i).remove();
|
||||
const tabsList = document.getElementById("output-tabs");
|
||||
const tabsListChildren = tabsList.children;
|
||||
|
||||
tabsList.classList.remove("tabs-left");
|
||||
tabsList.classList.remove("tabs-right");
|
||||
for (let i = tabsListChildren.length - 1; i >= 0; i--) {
|
||||
tabsListChildren.item(i).remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,8 +939,8 @@ class OutputWaiter {
|
|||
*/
|
||||
refreshTabs(activeTab, direction) {
|
||||
const newNums = this.getNearbyNums(activeTab, direction),
|
||||
tabsLeft = (newNums[0] !== this.getSmallestInputNum()),
|
||||
tabsRight = (newNums[newNums.length - 1] !== this.getLargestInputNum());
|
||||
tabsLeft = (newNums[0] !== this.getSmallestInputNum() && newNums.length > 0),
|
||||
tabsRight = (newNums[newNums.length - 1] !== this.getLargestInputNum() && newNums.length > 0);
|
||||
|
||||
this.manager.tabs.refreshOutputTabs(newNums, activeTab, tabsLeft, tabsRight);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue