From c4115a6143bd98d588f2e78bc9e81966b23ce4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Fri, 19 Jun 2026 13:16:49 +0200 Subject: [PATCH] :bug: Fix eyedropper not taking into account changes in dpr --- .../src/app/main/ui/workspace/viewport/pixel_overlay.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs index d5159f69ef..afc461b4c6 100644 --- a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs @@ -261,10 +261,11 @@ "Maps client (viewport) coordinates to device-pixel canvas coordinates." [viewport-node client-x client-y] (let [{brx :left bry :top} (dom/get-bounding-rect viewport-node) + dpr (wasm.api/get-dpr) x (mth/floor (- client-x brx)) y (mth/floor (- client-y bry))] - [(mth/floor (* x wasm.api/dpr)) - (mth/floor (* y wasm.api/dpr))])) + [(mth/floor (* x dpr)) + (mth/floor (* y dpr))])) (defn process-pointer-move-wasm "Updates the magnifier loupe with the canvas region under the cursor. The