Skip to content

Commit

Permalink
fix left panel resize issue fixes shader-slang#101
Browse files Browse the repository at this point in the history
  • Loading branch information
Devon7925 committed Jan 18, 2025
1 parent 363f75a commit 43b6ac9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ function prepareForResize() {
if (codeEditor.style.display == "none")
continue;
codeEditor.style.overflow = "hidden";
codeEditor.style.height = "100%";
}
workspaceDiv.style.overflow = "hidden";
leftContainer.style.overflowX = "hidden";
Expand All @@ -166,7 +167,13 @@ function finishResizing() {
let parentNode = codeEditor.parentNode;
if (codeEditor.clientHeight < 30 && parentNode instanceof HTMLElement)
parentNode.style.overflow = "hidden";
codeEditor.style.overflow = "visible";

if (codeEditor.clientHeight == 0) {
codeEditor.style.height = "0px";
codeEditor.style.overflow = "hidden";
} else {
codeEditor.style.overflow = "visible";
}
}
reflectionTab.style.maxWidth = assertGetElementById("rightContainerDiv").clientWidth + "px";

Expand Down

0 comments on commit 43b6ac9

Please sign in to comment.