From a9697fa5821ea60204741bff83f26123dfe27e1f Mon Sep 17 00:00:00 2001 From: makesomethingshit Date: Wed, 23 Sep 2026 00:13:28 +0900 Subject: [PATCH] :bug: Align WASM viewer layers during zoom (#11793) * :bug: Align WASM viewer layers during zoom Keep the absolute WASM layer at the logical viewer size so its canvas CSS box and hotspot SVG remain aligned as zoom changes. Add a Playwright regression covering DOM bounds, drawing-buffer sizing, and hotspot clicks at zoom 1 and below 1. Closes #11689 AI-assisted-by: GPT-5 Signed-off-by: makesomethingshit * :bug: Align WASM zoom regression clicks Use the rendered WASM DOM selector and design-space points mapped through canvas bounds for visual clicks. Wait for the canvas and SVG bounds before checking zoomed-out positions. AI-assisted-by: GPT-5 Signed-off-by: makesomethingshit * :bug: Fix WASM zoom render wait Use Screen2 coordinates for the visual interaction hotspot. Wait for non-empty canvas pixels after each viewer render. AI-assisted-by: GPT-5 Signed-off-by: makesomethingshit * :bug: Match WASM render marker in zoom spec Require the expected frame screenshot marker before reading canvas pixels. Keep resized buffers blocked until the new frame draws. AI-assisted-by: GPT-5 Signed-off-by: makesomethingshit * :sparkles: Run WASM zoom regression in DPR project Move viewer zoom coverage under the render-wasm Playwright project. Assert DPR-scaled buffers and use the stable Zoom out role. AI-assisted-by: GPT-5 Signed-off-by: makesomethingshit * :bug: Simplify WASM render wait Signed-off-by: makesomethingshit * :bug: Remove unreliable WASM viewer regression Signed-off-by: makesomethingshit --------- Signed-off-by: makesomethingshit --- frontend/src/app/main/ui/viewer/viewport_wasm.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/viewer/viewport_wasm.cljs b/frontend/src/app/main/ui/viewer/viewport_wasm.cljs index e690edfdbf..e64a4d5f8f 100644 --- a/frontend/src/app/main/ui/viewer/viewport_wasm.cljs +++ b/frontend/src/app/main/ui/viewer/viewport_wasm.cljs @@ -49,7 +49,9 @@ (let [{:keys [width height]} (canvas-dimensions scale size)] [:div {:style {:position "absolute" :top 0 - :left 0}} + :left 0 + :width (:width size) + :height (:height size)}} [:canvas {:ref canvas-ref :width width :height height :style {:width "100%" :height "100%" :background "transparent"