mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
♻️ Convert debug-bounding-boxes and shape-debug to * suffix
Rename debug-bounding-boxes and shape-debug to * suffix in shapes/debug.cljs; update all internal and external call sites across shapes/*.cljs files from [:& ...] to [:> ...].
This commit is contained in:
parent
991a0d8540
commit
c42baf2773
@ -41,5 +41,5 @@
|
||||
[:& bool-shape {:shape shape
|
||||
:childs childs}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))))
|
||||
|
||||
|
||||
@ -25,4 +25,4 @@
|
||||
[:> shape-container {:shape shape}
|
||||
[:& component {:shape shape}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])])))
|
||||
[:> wsd/shape-debug* {:shape shape}])])))
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc debug-bounding-boxes
|
||||
(mf/defc debug-bounding-boxes*
|
||||
[{:keys [shape]}]
|
||||
(let [points (->> (:points shape)
|
||||
(map #(dm/fmt "%,%" (dm/get-prop % :x) (dm/get-prop % :y)))
|
||||
@ -172,11 +172,11 @@
|
||||
(when hp
|
||||
[:circle {:data-i i :key (dm/str "c13-" i) :cx (:x hp) :cy (:y hp) :r radius :fill "green"}])]))]))
|
||||
|
||||
(mf/defc shape-debug
|
||||
(mf/defc shape-debug*
|
||||
[{:keys [shape]}]
|
||||
[:*
|
||||
(when ^boolean (dbg/enabled? :bounding-boxes)
|
||||
[:& debug-bounding-boxes {:shape shape}])
|
||||
[:> debug-bounding-boxes* {:shape shape}])
|
||||
|
||||
(when (and ^boolean (dbg/enabled? :bool-shapes)
|
||||
^boolean (cfh/bool-shape? shape))
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
[:& shape-container {:shape shape :ref ref}
|
||||
[:& frame-shape {:shape shape :childs childs}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))))
|
||||
|
||||
(defn check-props
|
||||
[new-props old-props]
|
||||
@ -230,5 +230,5 @@
|
||||
[:& frame-shape {:shape shape :ref content-ref}]])]
|
||||
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))))
|
||||
|
||||
|
||||
@ -33,5 +33,5 @@
|
||||
{:shape shape
|
||||
:childs childs}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))))
|
||||
|
||||
|
||||
@ -55,4 +55,4 @@
|
||||
:pointer-events (when editing? "none")}
|
||||
[:& path/path-shape {:shape shape}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
[:& svg-raw-shape {:shape shape
|
||||
:childs childs}]
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]
|
||||
[:> wsd/shape-debug* {:shape shape}])]
|
||||
|
||||
[:& svg-raw-shape {:shape shape
|
||||
:childs childs}])))))
|
||||
|
||||
@ -36,4 +36,4 @@
|
||||
[:& text/text-shape {:shape shape}]]
|
||||
|
||||
(when *assert*
|
||||
[:& wsd/shape-debug {:shape shape}])]))
|
||||
[:> wsd/shape-debug* {:shape shape}])]))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user