0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-23 07:16:07 -05:00

🐛 Fixes issue with multiple selection and shadows

This commit is contained in:
alonso.torres 2021-02-04 14:23:26 +01:00 committed by Andrey Antukh
parent 04670bb5f2
commit 32b0fd7b36
2 changed files with 12 additions and 2 deletions

View file

@ -47,7 +47,12 @@
handle-change
(fn [value]
(change! #(assoc-in % [:blur :value] value)))
(change! #(cond-> %
(not (contains? % :blur))
(assoc :blur (create-blur))
:always
(assoc-in [:blur :value] value))))
handle-toggle-visibility
(fn []

View file

@ -123,6 +123,9 @@
[v]
(when v (select-keys v blur-keys)))
(defn empty-map [keys]
(into {} (map #(hash-map % nil)) keys))
(defn get-attrs
"Given a `type` of options that we want to extract and the shapes to extract them from
returns a list of tuples [id, values] with the extracted properties for the shapes that
@ -142,7 +145,9 @@
result (case props
:ignore [ids values]
:shape [(conj ids id)
(merge-attrs values (select-keys shape attrs))]
(merge-attrs values (merge
(empty-map attrs)
(select-keys shape attrs)))]
:text [(conj ids id)
(-> values
(merge-attrs (select-keys shape attrs))