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