fixed first panel issue
This commit is contained in:
+11
-6
@@ -272,12 +272,7 @@ const Logic = {
|
|||||||
throw new Error("Something really bad happened. Unknown panel: " + panel);
|
throw new Error("Something really bad happened. Unknown panel: " + panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.innerWidth > 300) {
|
|
||||||
//if popup is in the overflow menu, window will be larger than 300px
|
|
||||||
var root = document.documentElement;
|
|
||||||
root.style.setProperty('--overflow-size', "125px");
|
|
||||||
root.style.setProperty('--icon-fit', "12");
|
|
||||||
}
|
|
||||||
this._previousPanel = this._currentPanel;
|
this._previousPanel = this._currentPanel;
|
||||||
this._currentPanel = panel;
|
this._currentPanel = panel;
|
||||||
|
|
||||||
@@ -296,6 +291,16 @@ const Logic = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.querySelector(this.getPanelSelector(this._panels[panel])).classList.remove("hide");
|
document.querySelector(this.getPanelSelector(this._panels[panel])).classList.remove("hide");
|
||||||
|
window.setTimeout(function () {
|
||||||
|
//sometimes this executes before the window is there and window.innerWidth returns undefined
|
||||||
|
var width = window.innerWidth;
|
||||||
|
if (width > 300) {
|
||||||
|
//if popup is in the overflow menu, window will be larger than 300px
|
||||||
|
var root = document.documentElement;
|
||||||
|
root.style.setProperty('--overflow-size', "125px");
|
||||||
|
root.style.setProperty('--icon-fit', "12");
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
},
|
},
|
||||||
|
|
||||||
showPreviousPanel() {
|
showPreviousPanel() {
|
||||||
|
|||||||
Reference in New Issue
Block a user