mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 11:16:38 +02: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)))
|
(reset! selrect-pos nil)))
|
||||||
|
|
||||||
(init []
|
(init []
|
||||||
(as-> wb/interactions-b $
|
(let [stoper (->> wb/interactions-b
|
||||||
(rx/filter #(not= % :draw/selrect) $)
|
(rx/filter #(not= % :draw/selrect))
|
||||||
(rx/take 1 $)
|
(rx/take 1))
|
||||||
(rx/take-until $ wb/mouse-s)
|
pos (gpt/add @wb/mouse-a @wb/scroll-a)]
|
||||||
(rx/subscribe $ on-value nil on-complete)))]
|
(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 $
|
(as-> wb/interactions-b $
|
||||||
(rx/dedupe $)
|
(rx/dedupe $)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue