Improve canvas assignation on shapes changes.

This commit is contained in:
Andrey Antukh 2019-09-21 20:14:07 +02:00
parent ddaf6bfc92
commit bb6ec9f89f
2 changed files with 43 additions and 2 deletions

View file

@ -63,9 +63,11 @@
[canvas page]
;; (scroll/scroll-to-page-center (mf/ref-node canvas) page)
(st/emit! (udp/watch-page-changes (:id page))
(udu/watch-page-changes (:id page)))
(udu/watch-page-changes (:id page))
(dw/start-shapes-watcher (:id page)))
(let [sub (shortcuts/init)]
#(do (st/emit! ::udp/stop-page-watcher)
#(do (st/emit! ::udp/stop-page-watcher
::dw/stop-shapes-watcher)
(rx/cancel! sub))))
(mf/defc workspace