0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 02:28:18 -05:00

Properly handle selrect double initialization.

This issue is happens when user emits mouse-up event out
of workspace, that is not captured by stoper stream, and
then user need to initialie and stop again the selrect.

The double initialization is not an issue but that
was raising unexpected exception and this commit
fixes that.
This commit is contained in:
Andrey Antukh 2017-02-21 19:36:54 +01:00
parent d57a71b8d6
commit 9f9bff17e5
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -214,7 +214,7 @@
(st/emit! (uev/mouse-event :down ctrl? shift?)))
(if drawing
(st/emit! (udw/start-drawing drawing))
(st/emit! (udw/start-selrect))))
(st/emit! ::uev/interrupt (udw/start-selrect))))
(on-context-menu [event]
(dom/prevent-default event)
(dom/stop-propagation event)