From f207136937e7342817a60413d45bc1d8294b94df Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 28 Jan 2016 20:32:33 +0200 Subject: [PATCH] Comment temporary the copy-selected event (because is broken). --- src/uxbox/data/workspace.cljs | 25 ++++++++++---------- src/uxbox/ui/workspace/toolboxes/layers.cljs | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/uxbox/data/workspace.cljs b/src/uxbox/data/workspace.cljs index ef29a4ba24..4618ca4f0d 100644 --- a/src/uxbox/data/workspace.cljs +++ b/src/uxbox/data/workspace.cljs @@ -283,18 +283,19 @@ (-apply-update [_ state] (assoc-in state [:workspace :selected] #{})))) -(defn copy-selected - "Copy the selected shapes." - [] - (reify - rs/WatchEvent - (-apply-watch [_ state] - (let [selected (get-in state [:workspace :selected])] - (as-> selected $ - (map #(get-in state [:shapes-by-id %]) $) - (map #(assoc % :id (random-uuid)) $) - (map #(add-shape % %) $) - (rx/from-coll $)))))) +;; ;; FIXME +;; (defn copy-selected +;; "Copy the selected shapes." +;; [] +;; (reify +;; rs/WatchEvent +;; (-apply-watch [_ state] +;; (let [selected (get-in state [:workspace :selected])] +;; (as-> selected $ +;; (map #(get-in state [:shapes-by-id %]) $) +;; (map #(assoc % :id (random-uuid)) $) +;; (map #(add-icon % %) $) +;; (rx/from-coll $)))))) (defn group-selected [] diff --git a/src/uxbox/ui/workspace/toolboxes/layers.cljs b/src/uxbox/ui/workspace/toolboxes/layers.cljs index 0154e4c062..d5037319d6 100644 --- a/src/uxbox/ui/workspace/toolboxes/layers.cljs +++ b/src/uxbox/ui/workspace/toolboxes/layers.cljs @@ -170,7 +170,7 @@ shapes-by-id (rum/react wb/shapes-by-id) page (rum/react (focus-page (:page workspace))) close #(rs/emit! (dw/toggle-toolbox :layers)) - copy #(rs/emit! (dw/copy-selected)) + ;; copy #(rs/emit! (dw/copy-selected)) group #(rs/emit! (dw/group-selected)) delete #(rs/emit! (dw/delete-selected))] (html @@ -190,7 +190,7 @@ (rum/with-key key))))]] [:div.layers-tools [:ul.layers-tools-content - [:li.clone-layer {:on-click copy} i/copy] + [:li.clone-layer #_{:on-click copy} i/copy] [:li.group-layer {:on-click group} i/folder] [:li.delete-layer {:on-click delete} i/trash]]]])))