From 346301eaace7de2dadc5a707b8b537359a9cb1bb Mon Sep 17 00:00:00 2001 From: ernstmul Date: Fri, 16 May 2025 16:34:40 +0200 Subject: [PATCH] Fix for glitch when resizing window --- .../studio/artifact-[artifact]/+layout.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/(console)/project-[project]/studio/artifact-[artifact]/+layout.svelte b/src/routes/(console)/project-[project]/studio/artifact-[artifact]/+layout.svelte index 272e476f9..59fbb264b 100644 --- a/src/routes/(console)/project-[project]/studio/artifact-[artifact]/+layout.svelte +++ b/src/routes/(console)/project-[project]/studio/artifact-[artifact]/+layout.svelte @@ -60,13 +60,16 @@ } }); - $effect(() => { + function recalculateHeights() { if (terminalOpen === false) { editorHeight = layoutElement.offsetHeight - 46; } else if (terminalOpen) { editorHeight = resizerTopPosition + 1; terminalHeight = layoutElement.offsetHeight - resizerTopPosition - terminalTabsHeight; } + } + $effect(() => { + recalculateHeights(); }); function startResize() { @@ -136,7 +139,7 @@ }); function onViewportResize() { - resizerTopPosition--; + recalculateHeights(); }