From b491cfcd2b77725bfb78a7fed7d56e1abf6c30f5 Mon Sep 17 00:00:00 2001 From: Timon Date: Thu, 7 Aug 2025 13:49:03 +0200 Subject: [PATCH] Desktop: Fix the Text tool not working with the hole punch (#3012) * Make viewport element transparent when hole punch is enabled Instead of removing the viewport element completely we make it transparent Allows the text tool to work * Fix formatting --- .../src/components/panels/Document.svelte | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/panels/Document.svelte b/frontend/src/components/panels/Document.svelte index 89e29ae0..4ab7afd6 100644 --- a/frontend/src/components/panels/Document.svelte +++ b/frontend/src/components/panels/Document.svelte @@ -533,16 +533,24 @@ y={cursorTop} /> {/if} - {#if !$appWindow.viewportHolePunch} -
canvasPointerDown(e)} bind:this={viewport} data-viewport> +
canvasPointerDown(e)} + bind:this={viewport} + data-viewport + > + {#if !$appWindow.viewportHolePunch} {@html artworkSvg} -
- {#if showTextInput} -
- {/if} -
+ {/if} +
+ {#if showTextInput} +
+ {/if} +
+ {#if !$appWindow.viewportHolePunch} -
- {/if} + {/if} +
+
@@ -757,6 +766,10 @@ .viewport { background: var(--color-2-mildblack); + } + + .viewport, + .viewport-transparent { width: 100%; height: 100%; // Allows the SVG to be placed at explicit integer values of width and height to prevent non-pixel-perfect SVG scaling