mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 06:46:10 +02:00
🐛 Fix middle button panning can drag guides
This commit is contained in:
parent
8e35ad0f7f
commit
d49e1f1641
3 changed files with 6 additions and 5 deletions
|
@ -69,10 +69,11 @@
|
|||
on-pointer-down
|
||||
(mf/use-callback
|
||||
(fn [event]
|
||||
(dom/capture-pointer event)
|
||||
(mf/set-ref-val! dragging-ref true)
|
||||
(mf/set-ref-val! start-ref (dom/get-client-position event))
|
||||
(mf/set-ref-val! start-pos-ref (get @ms/mouse-position axis))))
|
||||
(when (= 0 (.-button event))
|
||||
(dom/capture-pointer event)
|
||||
(mf/set-ref-val! dragging-ref true)
|
||||
(mf/set-ref-val! start-ref (dom/get-client-position event))
|
||||
(mf/set-ref-val! start-pos-ref (get @ms/mouse-position axis)))))
|
||||
|
||||
on-pointer-up
|
||||
(mf/use-callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue