0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-12 06:51:23 -05:00

💄 Minor naming consistency fix.

This commit is contained in:
Andrey Antukh 2020-05-05 18:48:21 +02:00 committed by Alonso Torres
parent 9d827d4b30
commit a2fbf99f3b
3 changed files with 10 additions and 11 deletions

View file

@ -60,10 +60,10 @@
group-shape (group/group-shape shape-wrapper)]
(mf/fnc group-wrapper
[{:keys [shape frame] :as props}]
(let [children (mapv #(get objects %) (:shapes shape))]
(let [childs (mapv #(get objects %) (:shapes shape))]
[:& group-shape {:frame frame
:shape shape
:children children}]))))
:childs childs}]))))
(defn shape-wrapper-factory
[objects]

View file

@ -19,14 +19,14 @@
(mf/fnc group-shape
{::mf/wrap-props false}
[props]
(let [frame (unchecked-get props "frame")
shape (unchecked-get props "shape")
children (unchecked-get props "children")
(let [frame (unchecked-get props "frame")
shape (unchecked-get props "shape")
childs (unchecked-get props "childs")
is-child-selected? (unchecked-get props "is-child-selected?")
{:keys [id x y width height]} shape
transform (geom/transform-matrix shape)]
[:g
(for [item children]
(for [item childs]
[:& shape-wrapper
{:frame frame :shape item :key (:id item)}])

View file

@ -44,10 +44,9 @@
on-context-menu (mf/use-callback (mf/deps shape)
#(common/on-context-menu % shape))
children-ref (mf/use-memo (mf/deps shape)
#(refs/objects-by-id (:shapes shape)))
children (mf/deref children-ref)
childs-ref (mf/use-memo (mf/deps shape)
#(refs/objects-by-id (:shapes shape)))
childs (mf/deref childs-ref)
is-child-selected-ref (mf/use-memo (mf/deps (:id shape))
#(refs/is-child-selected? (:id shape)))
@ -69,6 +68,6 @@
[:& group-shape
{:frame frame
:shape shape
:children children
:childs childs
:is-child-selected? is-child-selected?}]]))))