From 099cac9293eaea069bb26d2859bca723f2b24537 Mon Sep 17 00:00:00 2001 From: Ziheng Sun Date: Fri, 29 Mar 2024 22:34:37 -0400 Subject: [PATCH] fix the height of the full screen panel --- src/main/resources/static/js/gw.editor.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/resources/static/js/gw.editor.js b/src/main/resources/static/js/gw.editor.js index a19d8d7c2..3c4ed21ba 100644 --- a/src/main/resources/static/js/gw.editor.js +++ b/src/main/resources/static/js/gw.editor.js @@ -8,12 +8,14 @@ GW.editor = { if (!sidepanel.hasClass("fullscreen")) { // this.beforeFullscreen = { height: sidepanel.height(), width: sidepanel.width() } sidepanel.addClass("fullscreen"); - sidepanel.height("100vh"); - sidepanel.width("100vw"); + // sidepanel.height("100vh"); + // sidepanel.width("100vw"); + sidepanel.css('height', '100vh'); + sidepanel.css('width', '100vw'); sidepanel.css("top", "0"); - $("#prompt-panel-main").height("calc(100% - 55px)"); - $("#prompt-panel-main-process-info-code").height("100%"); - $("#prompt-panel-main-process-info-history").height("100%"); + $("#prompt-panel-main").css('height', "calc(100% - 45px)"); + $("#prompt-panel-main-process-info-code").css('height', '100%'); + $("#prompt-panel-main-process-info-history").css('height', '100%'); GW.process.sidepanel.leftDock(); this.isfullscreen = true; } else { @@ -23,11 +25,11 @@ GW.editor = { sidepanel.css("top", "52px"); // subtabCodeDiv.height('calc(100% - 150px)'); // subtabHistoryDiv.height('calc(100% - 150px)'); - sidepanel.height("100%"); - sidepanel.width("40%"); - $("#prompt-panel-main").height("calc(100% - 95px)"); - $("#prompt-panel-main-process-info-code").height("100%"); - $("#prompt-panel-main-process-info-history").height("100%"); + sidepanel.css('height', '100%'); + sidepanel.css('width', '40%'); + $("#prompt-panel-main").css('height', "calc(100% - 95px)"); + $("#prompt-panel-main-process-info-code").css('height', '100%'); + $("#prompt-panel-main-process-info-history").css('height', '100%'); GW.process.sidepanel.bottomDock(); // editor.refresh(); this.isfullscreen = false;