mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 19:46:38 +02:00
📎 Add two more debug options :display-touched and :show-ids
This commit is contained in:
parent
1d25115218
commit
0cd44f5540
3 changed files with 14 additions and 3 deletions
|
@ -109,6 +109,8 @@
|
||||||
:style {"--depth" depth "--parent-size" parent-size}
|
:style {"--depth" depth "--parent-size" parent-size}
|
||||||
:ref ref
|
:ref ref
|
||||||
:on-double-click start-edit}
|
:on-double-click start-edit}
|
||||||
(d/nilv shape-name "")]
|
(if (dbg/enabled? :show-ids)
|
||||||
|
(str (d/nilv shape-name "") " | " (str/slice (str shape-id) 24))
|
||||||
|
(d/nilv shape-name ""))]
|
||||||
(when (and (dbg/enabled? :show-touched) ^boolean shape-touched?)
|
(when (and (dbg/enabled? :show-touched) ^boolean shape-touched?)
|
||||||
[:span {:class (stl/css :element-name-touched)} "*"])])))
|
[:span {:class (stl/css :element-name-touched)} "*"])])))
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.main.ui.workspace.sidebar.assets.common :as cmm]
|
[app.main.ui.workspace.sidebar.assets.common :as cmm]
|
||||||
|
[app.util.debug :as dbg]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.timers :as tm]
|
[app.util.timers :as tm]
|
||||||
|
@ -639,4 +640,6 @@
|
||||||
[:& component-swap {:shapes copies}])
|
[:& component-swap {:shapes copies}])
|
||||||
|
|
||||||
(when (and (not swap-opened?) (not multi) components-v2)
|
(when (and (not swap-opened?) (not multi) components-v2)
|
||||||
[:& component-annotation {:id id :shape shape :component component}])])])))
|
[:& component-annotation {:id id :shape shape :component component}])
|
||||||
|
(when (dbg/enabled? :display-touched)
|
||||||
|
[:div ":touched " (str (:touched shape))])])])))
|
||||||
|
|
|
@ -73,6 +73,9 @@
|
||||||
;; Show an asterisk for touched copies
|
;; Show an asterisk for touched copies
|
||||||
:show-touched
|
:show-touched
|
||||||
|
|
||||||
|
;; Show the id with the name
|
||||||
|
:show-ids
|
||||||
|
|
||||||
;;
|
;;
|
||||||
:grid-layout
|
:grid-layout
|
||||||
|
|
||||||
|
@ -80,7 +83,10 @@
|
||||||
:grid-cells
|
:grid-cells
|
||||||
|
|
||||||
;; Show info about shapes
|
;; Show info about shapes
|
||||||
:shape-panel})
|
:shape-panel
|
||||||
|
|
||||||
|
;; Show what is touched in copies
|
||||||
|
:display-touched})
|
||||||
|
|
||||||
(defn enable!
|
(defn enable!
|
||||||
[option]
|
[option]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue