From a2fbf99f3b42f71e682c6d9978e784dec1361db9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 5 May 2020 18:48:21 +0200 Subject: [PATCH] :lipstick: Minor naming consistency fix. --- frontend/src/uxbox/main/exports.cljs | 4 ++-- frontend/src/uxbox/main/ui/shapes/group.cljs | 8 ++++---- frontend/src/uxbox/main/ui/workspace/shapes/group.cljs | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/frontend/src/uxbox/main/exports.cljs b/frontend/src/uxbox/main/exports.cljs index 85b3f6704..4c6ace7b7 100644 --- a/frontend/src/uxbox/main/exports.cljs +++ b/frontend/src/uxbox/main/exports.cljs @@ -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] diff --git a/frontend/src/uxbox/main/ui/shapes/group.cljs b/frontend/src/uxbox/main/ui/shapes/group.cljs index 590a141e7..8c967a3eb 100644 --- a/frontend/src/uxbox/main/ui/shapes/group.cljs +++ b/frontend/src/uxbox/main/ui/shapes/group.cljs @@ -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)}]) diff --git a/frontend/src/uxbox/main/ui/workspace/shapes/group.cljs b/frontend/src/uxbox/main/ui/workspace/shapes/group.cljs index be9779208..b53cd912b 100644 --- a/frontend/src/uxbox/main/ui/workspace/shapes/group.cljs +++ b/frontend/src/uxbox/main/ui/workspace/shapes/group.cljs @@ -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?}]]))))