mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Make aware of scroll the selrect component.
This commit is contained in:
parent
f36a61dcc6
commit
c2fb18a2df
1 changed files with 8 additions and 5 deletions
|
@ -69,11 +69,14 @@
|
|||
(reset! selrect-pos nil)))
|
||||
|
||||
(init []
|
||||
(as-> wb/interactions-b $
|
||||
(rx/filter #(not= % :draw/selrect) $)
|
||||
(rx/take 1 $)
|
||||
(rx/take-until $ wb/mouse-s)
|
||||
(rx/subscribe $ on-value nil on-complete)))]
|
||||
(let [stoper (->> wb/interactions-b
|
||||
(rx/filter #(not= % :draw/selrect))
|
||||
(rx/take 1))
|
||||
pos (gpt/add @wb/mouse-a @wb/scroll-a)]
|
||||
(reset! selrect-pos {:start pos :current pos})
|
||||
(as-> wb/mouse-s $
|
||||
(rx/take-until stoper $)
|
||||
(rx/subscribe $ on-value nil on-complete))))]
|
||||
|
||||
(as-> wb/interactions-b $
|
||||
(rx/dedupe $)
|
||||
|
|
Loading…
Add table
Reference in a new issue