mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 12:06:11 +02:00
✨ Remove unexpected lag on moving shape.
The lag happens when the shape is not initially selected.
This commit is contained in:
parent
1357fed067
commit
792303a833
15 changed files with 106 additions and 121 deletions
|
@ -154,10 +154,10 @@
|
|||
[{:keys [shape modifiers zoom] :as props}]
|
||||
(letfn [(on-mouse-down [event index]
|
||||
(dom/stop-propagation event)
|
||||
|
||||
;; TODO: this need code ux refactor
|
||||
(let [stoper (get-edition-stream-stoper)
|
||||
stream (rx/take-until stoper ws/mouse-position-deltas)]
|
||||
stream (->> (ws/mouse-position-deltas @ws/mouse-position)
|
||||
(rx/take-until stoper))]
|
||||
(when @refs/selected-alignment
|
||||
(st/emit! (dw/initial-path-point-align (:id shape) index)))
|
||||
(rx/subscribe stream #(on-handler-move % index))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue