forked from ZenBrowserMirrors/zen-desktop
chore: Cleanup calls to updateSplitViewButton
, b=(no-bug), c=split-view
This commit is contained in:
parent
e48e7caef1
commit
a6bc8d7105
2 changed files with 0 additions and 22 deletions
|
@ -993,7 +993,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||||
tab = tab.parentNode.closest('.tabbrowser-tab');
|
tab = tab.parentNode.closest('.tabbrowser-tab');
|
||||||
console.assert(tab, 'Tab not found for zen-glance-tab');
|
console.assert(tab, 'Tab not found for zen-glance-tab');
|
||||||
}
|
}
|
||||||
this.updateSplitViewButton(!tab?.splitView);
|
|
||||||
if (tab) {
|
if (tab) {
|
||||||
this.updateSplitView(tab);
|
this.updateSplitView(tab);
|
||||||
tab.linkedBrowser.docShellIsActive = true;
|
tab.linkedBrowser.docShellIsActive = true;
|
||||||
|
@ -1127,7 +1126,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||||
|
|
||||||
if (oldView === newView) return;
|
if (oldView === newView) return;
|
||||||
if (newView < 0 && oldView >= 0) {
|
if (newView < 0 && oldView >= 0) {
|
||||||
this.updateSplitViewButton(true);
|
|
||||||
this.deactivateCurrentSplitView();
|
this.deactivateCurrentSplitView();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1147,7 +1145,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||||
}
|
}
|
||||||
this.removeSplitters();
|
this.removeSplitters();
|
||||||
this.tabBrowserPanel.removeAttribute('zen-split-view');
|
this.tabBrowserPanel.removeAttribute('zen-split-view');
|
||||||
this.updateSplitViewButton(true);
|
|
||||||
this.currentView = -1;
|
this.currentView = -1;
|
||||||
this.toggleWrapperDisplay(false);
|
this.toggleWrapperDisplay(false);
|
||||||
}
|
}
|
||||||
|
@ -1171,7 +1168,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||||
|
|
||||||
this.tabBrowserPanel.setAttribute('zen-split-view', 'true');
|
this.tabBrowserPanel.setAttribute('zen-split-view', 'true');
|
||||||
|
|
||||||
this.updateSplitViewButton(false);
|
|
||||||
this.applyGridToTabs(splitData.tabs);
|
this.applyGridToTabs(splitData.tabs);
|
||||||
this.applyGridLayout(splitData.layoutTree);
|
this.applyGridLayout(splitData.layoutTree);
|
||||||
this.setTabsDocShellState(splitData.tabs, true);
|
this.setTabsDocShellState(splitData.tabs, true);
|
||||||
|
@ -1498,20 +1494,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||||
container.style.inset = '';
|
container.style.inset = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the split view button visibility.
|
|
||||||
*
|
|
||||||
* @param {boolean} hidden - Indicates if the button should be hidden.
|
|
||||||
*/
|
|
||||||
updateSplitViewButton(hidden) {
|
|
||||||
const button = document.getElementById('zen-split-views-box');
|
|
||||||
if (hidden) {
|
|
||||||
button?.setAttribute('hidden', 'true');
|
|
||||||
} else {
|
|
||||||
button?.removeAttribute('hidden');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the UI of the panel.
|
* Updates the UI of the panel.
|
||||||
*
|
*
|
||||||
|
|
|
@ -112,10 +112,6 @@
|
||||||
cursor: ns-resize;
|
cursor: ns-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#zen-split-views-box:not([hidden='true']) {
|
|
||||||
display: flex !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zen-view-splitter-header-container {
|
.zen-view-splitter-header-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(var(--zen-split-column-gap) / -2);
|
top: calc(var(--zen-split-column-gap) / -2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue