Get rid of buggy reactive locks and refactor all related code.

This commit is contained in:
Andrey Antukh 2017-01-30 17:08:02 +01:00
parent bce58df413
commit b0de23b011
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
18 changed files with 611 additions and 516 deletions

View file

@ -17,7 +17,6 @@
[uxbox.util.color :as color]
[uxbox.util.dom :as dom]
[uxbox.util.geom.matrix :as gmt]
[uxbox.util.rlocks :as rlocks]
[uxbox.util.mixins :as mx :include-macros true])
(:import goog.events.EventType))
@ -48,6 +47,8 @@
(letfn [(on-mouse-down [event]
(handle-mouse-down event shape selected))
(on-double-click [event]
;; TODO: handle grouping event propagation
;; TODO: handle actions locking properly
(dom/stop-propagation event)
(st/emit! (uds/start-edition-mode id)))]
[:g.shape {:class (when selected? "selected")
@ -149,11 +150,9 @@
own))
(mx/defc text-shape-wrapper
{
:did-mount text-shape-wrapper-did-mount
{:did-mount text-shape-wrapper-did-mount
:did-remount text-shape-wrapper-did-remount}
[{:keys [id tmp-resize-xform tmp-displacement drawing?] :as shape}]
(println "text-shape-wrapper" shape)
(let [xfmt (cond-> (gmt/matrix)
tmp-displacement (gmt/translate tmp-displacement)
tmp-resize-xform (gmt/multiply tmp-resize-xform))
@ -182,7 +181,6 @@
(let [style (make-style shape)]
[:div {:style style} content]))
;; --- Text Shape Html
(mx/defc text-shape