mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
Merge pull request #5324 from penpot/superalex-fix-panning-events
🐛 Fix streaming of panning events
This commit is contained in:
commit
05e77957ca
1 changed files with 2 additions and 0 deletions
|
@ -157,6 +157,8 @@
|
|||
(rx/filter mse/pointer-event?)
|
||||
(rx/filter #(= :delta (:source %)))
|
||||
(rx/take-until stopper)
|
||||
;; Some events are executed in synchronous way like panning with backspace pressed
|
||||
(rx/observe-on :af)
|
||||
(rx/map (fn [event]
|
||||
(let [delta (dm/get-prop event :pt)]
|
||||
(update-viewport-position {:x #(- % (/ (:x delta) zoom))
|
||||
|
|
Loading…
Add table
Reference in a new issue