🐛 Problem with resize 0

This commit is contained in:
alonso.torres 2020-09-22 15:32:33 +02:00 committed by Andrey Antukh
parent 0545e7cb28
commit d17c6d8fce
2 changed files with 19 additions and 6 deletions

View file

@ -272,7 +272,9 @@
on-close
(fn []
(when (not read-only?)
(st/emit! dw/clear-edition-mode)))
(st/emit! dw/clear-edition-mode))
(when (= 0 (content-size @content-var))
(st/emit! (dw/delete-shapes [id]))))
on-click-outside
(fn [event]
@ -289,10 +291,7 @@
(and cpicker (.contains cpicker target)))
(if selecting?
(mf/set-ref-val! selecting-ref false)
(on-close))))
(when (= 0 (content-size @content-var))
(st/emit! (dw/delete-shapes [id]))))
(on-close)))))
on-mouse-down
(fn [event]