mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 01:16:11 +02:00
Minor changes on shapes.
This commit is contained in:
parent
6801cc65af
commit
2412713f70
2 changed files with 9 additions and 8 deletions
|
@ -597,7 +597,8 @@
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(let [pid (get-in state [:workspace :page])
|
(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])]
|
selected (get-in state [:workspace :selected])]
|
||||||
(impl/group-shapes state selected used-names pid)))))
|
(impl/group-shapes state selected used-names pid)))))
|
||||||
|
|
||||||
|
@ -620,7 +621,8 @@
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(let [pid (get-in state [:workspace :page])
|
(let [pid (get-in state [:workspace :page])
|
||||||
selected (get-in state [:workspace :selected])
|
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)))))
|
(impl/duplicate-shapes state selected used-names)))))
|
||||||
|
|
||||||
(defn delete-selected
|
(defn delete-selected
|
||||||
|
@ -644,7 +646,6 @@
|
||||||
(->> (get-in state [:workspace :selected])
|
(->> (get-in state [:workspace :selected])
|
||||||
(map #(update-fill-attrs % opts)))))))
|
(map #(update-fill-attrs % opts)))))))
|
||||||
|
|
||||||
|
|
||||||
(defn update-selected-shapes-stroke
|
(defn update-selected-shapes-stroke
|
||||||
"Update the fill related attributed on
|
"Update the fill related attributed on
|
||||||
selected shapes."
|
selected shapes."
|
||||||
|
|
|
@ -89,11 +89,11 @@
|
||||||
|
|
||||||
;; --- Helpers
|
;; --- Helpers
|
||||||
|
|
||||||
(defn- move-selected
|
;; (defn- move-selected
|
||||||
[dir speed]
|
;; [dir speed]
|
||||||
(case speed
|
;; (case speed
|
||||||
:std (st/emit! (uds/move-selected dir 1))
|
;; :std (st/emit! (uds/move-selected dir 1))
|
||||||
:fast (st/emit! (uds/move-selected dir 20))))
|
;; :fast (st/emit! (uds/move-selected dir 20))))
|
||||||
|
|
||||||
;; --- Mixin
|
;; --- Mixin
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue