🐛 Fix problem with shadows

This commit is contained in:
alonso.torres 2024-05-28 09:53:20 +02:00 committed by Andrey Antukh
parent dad91421b1
commit 032e551dc1
2 changed files with 23 additions and 21 deletions

View file

@ -233,7 +233,7 @@
:blur 4
:spread 0
:hidden false}
(utils/from-js val)))
(utils/from-js val #{:style :type})))
value)]
(st/emit! (dwc/update-shapes [id] #(assoc % :shadow value)))))}

View file

@ -124,7 +124,9 @@
(defn from-js
"Converts the object back to js"
[obj]
([obj]
(from-js obj #{:type}))
([obj keyword-keys]
(when (some? obj)
(let [process-node
(fn process-node [node]
@ -140,14 +142,14 @@
(and (string? v) (re-matches us/uuid-rx v))
(uuid/uuid v)
(= k :type)
(contains? keyword-keys k)
(keyword v)
:else v)]
(assoc m k v)))
{}
node))]
(process-node (js->clj obj)))))
(process-node (js->clj obj))))))
(defn to-js
"Converts to javascript an camelize the keys"