mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 14:51:37 -05:00
Merge pull request #2922 from penpot/palba-fix-middle-button-drags-guides
🐛 Fix middle button panning can drag guides
This commit is contained in:
commit
a99fb7ada3
2 changed files with 6 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
### :bug: Bugs fixed
|
||||
- Fix paste board inside itself [Taiga #4775](https://tree.taiga.io/project/penpot/issue/4775)
|
||||
- Fix middle button panning can drag guides [Taiga #4266](https://tree.taiga.io/project/penpot/issue/4266)
|
||||
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
|
||||
|
|
|
@ -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
Reference in a new issue