mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 20:46:11 +02:00
🐛 Fixes issue with multiple selection and shadows
This commit is contained in:
parent
04670bb5f2
commit
32b0fd7b36
2 changed files with 12 additions and 2 deletions
|
@ -47,7 +47,12 @@
|
||||||
|
|
||||||
handle-change
|
handle-change
|
||||||
(fn [value]
|
(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
|
handle-toggle-visibility
|
||||||
(fn []
|
(fn []
|
||||||
|
|
|
@ -123,6 +123,9 @@
|
||||||
[v]
|
[v]
|
||||||
(when v (select-keys v blur-keys)))
|
(when v (select-keys v blur-keys)))
|
||||||
|
|
||||||
|
(defn empty-map [keys]
|
||||||
|
(into {} (map #(hash-map % nil)) keys))
|
||||||
|
|
||||||
(defn get-attrs
|
(defn get-attrs
|
||||||
"Given a `type` of options that we want to extract and the shapes to extract them from
|
"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
|
returns a list of tuples [id, values] with the extracted properties for the shapes that
|
||||||
|
@ -142,7 +145,9 @@
|
||||||
result (case props
|
result (case props
|
||||||
:ignore [ids values]
|
:ignore [ids values]
|
||||||
:shape [(conj ids id)
|
: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)
|
:text [(conj ids id)
|
||||||
(-> values
|
(-> values
|
||||||
(merge-attrs (select-keys shape attrs))
|
(merge-attrs (select-keys shape attrs))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue