mirror of
https://github.com/penpot/penpot.git
synced 2026-03-11 21:06:48 +00:00
🐛 Fix snap to pixel on path creation and edit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user