0
Fork 0
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:
Eva 2023-01-18 11:57:48 +01:00 committed by Alonso Torres
parent c5d8d77070
commit f93d0e1c4d
3 changed files with 3 additions and 5 deletions

View file

@ -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]

View file

@ -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))))

View file

@ -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