mirror of
https://github.com/penpot/penpot.git
synced 2025-06-18 17:41:41 +02:00
⚡ Add throttling to over-shapes-stream on viewport
This commit is contained in:
parent
ec1c1fcd2f
commit
a754d5ae3b
1 changed files with 13 additions and 12 deletions
|
@ -154,7 +154,7 @@
|
|||
|
||||
over-shapes-stream
|
||||
(mf/with-memo [move-stream mod-str]
|
||||
(rx/merge
|
||||
(->> (rx/merge
|
||||
;; This stream works to "refresh" the outlines when the control is pressed
|
||||
;; but the mouse has not been moved from its position.
|
||||
(->> mod-str
|
||||
|
@ -166,7 +166,8 @@
|
|||
(->> move-stream
|
||||
(rx/tap #(reset! last-point-ref %))
|
||||
;; When transforming shapes we stop querying the worker
|
||||
(rx/merge-map query-point))))]
|
||||
(rx/merge-map query-point)))
|
||||
(rx/throttle 100)))]
|
||||
|
||||
;; Refresh the refs on a value change
|
||||
(mf/use-effect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue