From bdf476e29717c8a0373532c4be7b79bd8ecb0d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 23 Dec 2016 12:40:20 +0100 Subject: [PATCH] Temporary hack on groups of groups --- .../uxbox/main/ui/workspace/sidebar/layers.cljs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs index 3b2f147ea5..f67b5f36df 100644 --- a/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/uxbox/main/ui/workspace/sidebar/layers.cljs @@ -202,11 +202,14 @@ selected? (contains? selected (:id item)) collapsed? (:collapsed item true) shapes-map (mx/react wb/shapes-by-id-ref) - classes (classnames - :selected selected? - :drag-top (= :top (:over @local)) - :drag-bottom (= :bottom (:over @local)) - :drag-inside (= :middle (:over @local))) + ;; TODO: Fix this temporary hack (Looks like a problem in defcs macro) + classes (if (nil? own) + (classnames :selected selected?) + (classnames + :selected selected? + :drag-top (= :top (:over @local)) + :drag-bottom (= :bottom (:over @local)) + :drag-inside (= :middle (:over @local)))) select #(select-shape selected item %) toggle-visibility #(toggle-visibility selected item %) toggle-blocking #(toggle-blocking item %)] @@ -280,7 +283,8 @@ (for [shape (map #(get shapes-map %) (:items item)) :let [key (str (:id shape))]] (if (= (:type shape) :group) - (-> (layer-group shape selected) + ;; TODO: Fix this temporary hack (Looks like a problem in defcs macro) + (-> (layer-group nil shape selected) (mx/with-key key)) (-> (layer-simple shape selected) (mx/with-key key))))])])))