🐛 Align WASM viewer layers during zoom (#11793)

* 🐛 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 <junsoo1172@gmail.com>

* 🐛 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 <junsoo1172@gmail.com>

* 🐛 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 <junsoo1172@gmail.com>

* 🐛 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 <junsoo1172@gmail.com>

*  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 <junsoo1172@gmail.com>

* 🐛 Simplify WASM render wait

Signed-off-by: makesomethingshit <junsoo1172@gmail.com>

* 🐛 Remove unreliable WASM viewer regression

Signed-off-by: makesomethingshit <junsoo1172@gmail.com>

---------

Signed-off-by: makesomethingshit <junsoo1172@gmail.com>
This commit is contained in:
makesomethingshit 2026-09-23 00:13:28 +09:00 committed by GitHub
parent 9e472ee452
commit a9697fa582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"