mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix snap to pixel on path creation and edit
This commit is contained in:
parent
c5d8d77070
commit
f93d0e1c4d
3 changed files with 3 additions and 5 deletions
|
@ -293,7 +293,7 @@
|
|||
(update [_ state]
|
||||
(let [id (st/get-path-id state)]
|
||||
(-> state
|
||||
(assoc-in [:workspace-local :edit-path id :snap-toggled] true))))
|
||||
(assoc-in [:workspace-local :edit-path id :snap-toggled] false))))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state stream]
|
||||
|
|
|
@ -290,7 +290,7 @@
|
|||
(or (not edit-path) (= :draw (:edit-mode edit-path)))
|
||||
(assoc-in [:workspace-local :edit-path id] {:edit-mode :move
|
||||
:selected #{}
|
||||
:snap-toggled true})
|
||||
:snap-toggled false})
|
||||
|
||||
(and (some? edit-path) (= :move (:edit-mode edit-path)))
|
||||
(assoc-in [:workspace-local :edit-path id :edit-mode] :draw))))
|
||||
|
|
|
@ -106,9 +106,7 @@
|
|||
on-toggle-snap
|
||||
(mf/use-callback
|
||||
(fn [_]
|
||||
(st/emit! (drp/toggle-snap))))
|
||||
|
||||
]
|
||||
(st/emit! (drp/toggle-snap))))]
|
||||
[:div.path-actions
|
||||
[:div.viewport-actions-group
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue