0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00

🐛 Fixes problem with pixel-level movement

This commit is contained in:
alonso.torres 2021-02-04 11:44:44 +01:00 committed by Hirunatan
parent 7eb90d62b0
commit 32c0913f00

View file

@ -378,15 +378,17 @@
(->> move-events
(rx/take-until stopper)
(rx/scan #(gpt/add %1 mov-vec) (gpt/point 0 0))
(rx/map #(set-modifiers selected {:displacement (gmt/translate-matrix %)})))
(rx/map gmt/translate-matrix)
(rx/map #(fn [state] (assoc-in state [:workspace-local :modifiers] {:displacement %}))))
(rx/of (move-selected direction shift?)))
(rx/of (apply-modifiers selected)
(rx/of (set-modifiers selected)
(apply-modifiers selected)
(calculate-frame-for-move selected)
(fn [state] (-> state
(update :workspace-local dissoc :current-move-selected))))
(->>
(rx/timer 100)
(rx/map (fn [] finish-transform)))))
(update :workspace-local dissoc :modifiers)
(update :workspace-local dissoc :current-move-selected)))
finish-transform)))
(rx/empty))))))