🐛 Add missing zoom and page-id dep on snap-feedback use-effect

This commit is contained in:
Andrey Antukh 2026-04-02 09:24:36 +00:00 committed by Belén Albeza
parent 988c277e37
commit b4ec0a6d55
2 changed files with 3 additions and 2 deletions

View File

@ -187,8 +187,8 @@
:stroke-width rulers-width}}]]))]))
(mf/defc viewport-frame*
{::mf/private true}
[{:keys [show-rulers zoom zoom-inverse vbox offset-x offset-y]}]
(let [{:keys [width height] x1 :x y1 :y} vbox
x2 (+ x1 width)
y2 (+ y1 height)

View File

@ -101,6 +101,7 @@
(hash-map coord fixedv (flip coord) maxv)]))))
(mf/defc snap-feedback*
{::mf/private true}
[{:keys [shapes remove-snap zoom modifiers page-id]}]
(let [state (mf/use-state [])
subject (mf/use-memo #(rx/subject))
@ -133,7 +134,7 @@
#(rx/dispose! sub))))
(mf/use-effect
(mf/deps shapes remove-snap modifiers)
(mf/deps shapes remove-snap modifiers page-id zoom)
(fn []
(rx/push! subject {:shapes shapes
:page-id page-id