fix: Incorrectly calculating rest-pane width in https://github.com/TriliumNext/Notes/pull/1962

This commit is contained in:
SiriusXT
2025-05-18 18:38:52 +08:00
parent 0e9c381df4
commit 9682253ced

View File

@@ -23,7 +23,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
// Window resizing causes `window.innerWidth` to change, so `reservedWidth` needs to be recalculated each time.
const reservedWidth = reservedPx / window.innerWidth * 100;
if (!leftPaneVisible) {
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `calc(100% - ${reservedWidth})` : "100%");
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `${(100 - reservedWidth) * 100}%` : "100%");
return;
}