0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 00:58:26 -05:00

Comment broken copy event.

This commit is contained in:
Andrey Antukh 2016-01-30 00:13:16 +02:00
parent deb38435fd
commit 949b522ba0

View file

@ -320,19 +320,23 @@
(-apply-update [_ state]
(assoc-in state [:workspace :selected] #{}))))
;; ;; FIXME
;; 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 $))))))
;; (letfn [(valid-selection? [shapes]
;; (let [groups (into #{} (map :group shapes))]
;; (= 1 (count groups))))]
;; (reify
;; rs/WatchEvent
;; (-apply-watch [_ state]
;; (let [selected (get-in state [:workspace :selected])
;; selected (map #(get-in state [:shapes-by-id %]) selected)]
;; (if (valid-selection? selected)
;; (as-> selected $
;; (map #(assoc % :id (random-uuid)) $)
;; (map #(add-shape % %) $)
;; (rx/from-coll $))))))
(defn group-selected
[]