0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

Minor changes on shapes.

This commit is contained in:
Andrey Antukh 2016-12-25 21:05:02 +01:00
parent 6801cc65af
commit 2412713f70
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
2 changed files with 9 additions and 8 deletions

View file

@ -597,7 +597,8 @@
ptk/UpdateEvent
(update [_ state]
(let [pid (get-in state [:workspace :page])
used-names (map #(get-in state [:shapes % :name]) (get-in state [:pages pid :shapes]))
used-names (map #(get-in state [:shapes % :name])
(get-in state [:pages pid :shapes]))
selected (get-in state [:workspace :selected])]
(impl/group-shapes state selected used-names pid)))))
@ -620,7 +621,8 @@
(update [_ state]
(let [pid (get-in state [:workspace :page])
selected (get-in state [:workspace :selected])
used-names (map #(get-in state [:shapes % :name]) (get-in state [:pages pid :shapes]))]
used-names (map #(get-in state [:shapes % :name])
(get-in state [:pages pid :shapes]))]
(impl/duplicate-shapes state selected used-names)))))
(defn delete-selected
@ -644,7 +646,6 @@
(->> (get-in state [:workspace :selected])
(map #(update-fill-attrs % opts)))))))
(defn update-selected-shapes-stroke
"Update the fill related attributed on
selected shapes."

View file

@ -89,11 +89,11 @@
;; --- Helpers
(defn- move-selected
[dir speed]
(case speed
:std (st/emit! (uds/move-selected dir 1))
:fast (st/emit! (uds/move-selected dir 20))))
;; (defn- move-selected
;; [dir speed]
;; (case speed
;; :std (st/emit! (uds/move-selected dir 1))
;; :fast (st/emit! (uds/move-selected dir 20))))
;; --- Mixin