mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 16:11:40 +02:00
Get rid of buggy reactive locks and refactor all related code.
This commit is contained in:
parent
bce58df413
commit
b0de23b011
18 changed files with 611 additions and 516 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue