mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
fix: Incorrectly calculating rest-pane width in https://github.com/TriliumNext/Notes/pull/1962
This commit is contained in:
@@ -23,7 +23,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
|
|||||||
// Window resizing causes `window.innerWidth` to change, so `reservedWidth` needs to be recalculated each time.
|
// Window resizing causes `window.innerWidth` to change, so `reservedWidth` needs to be recalculated each time.
|
||||||
const reservedWidth = reservedPx / window.innerWidth * 100;
|
const reservedWidth = reservedPx / window.innerWidth * 100;
|
||||||
if (!leftPaneVisible) {
|
if (!leftPaneVisible) {
|
||||||
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `calc(100% - ${reservedWidth})` : "100%");
|
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `${(100 - reservedWidth) * 100}%` : "100%");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user