mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 14:41:37 +02:00
🐛 Fix edition mode of paths (and many perfomance improvements).
This commit is contained in:
parent
775166f5f2
commit
2c321cbdb8
10 changed files with 117 additions and 139 deletions
|
@ -8,15 +8,13 @@
|
|||
(:require
|
||||
[cuerdas.core :as str :include-macros true]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.data.workspace :as udw]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.util.data :refer [classnames normalize-props]]
|
||||
[uxbox.util.geom.matrix :as gmt]
|
||||
[uxbox.util.geom.point :as gpt]))
|
||||
[uxbox.util.data :refer [classnames normalize-props]]))
|
||||
|
||||
;; --- Path Component
|
||||
|
||||
|
@ -31,7 +29,8 @@
|
|||
(common/on-mouse-down event shape selected))
|
||||
(on-double-click [event]
|
||||
(when selected?
|
||||
(st/emit! (uds/start-edition-mode (:id shape)))))]
|
||||
(prn "on-double-click")
|
||||
(st/emit! (udw/start-edition-mode (:id shape)))))]
|
||||
[:g.shape {:class (when selected? "selected")
|
||||
:on-double-click on-double-click
|
||||
:on-mouse-down on-mouse-down}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
[rumext.core :as mx]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.data.workspace :as udw]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.main.store :as st]
|
||||
|
@ -55,7 +56,7 @@
|
|||
;; TODO: handle grouping event propagation
|
||||
;; TODO: handle actions locking properly
|
||||
(dom/stop-propagation event)
|
||||
(st/emit! (uds/start-edition-mode id)))]
|
||||
(st/emit! (udw/start-edition-mode id)))]
|
||||
[:g.shape {:class (when selected? "selected")
|
||||
:on-double-click on-double-click
|
||||
:on-mouse-down on-mouse-down}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue