mirror of
https://github.com/penpot/penpot.git
synced 2025-02-14 19:19:09 -05:00
Merge pull request #3814 from penpot/azazeln28-fix-color-picker
🐛 Fix color picker
This commit is contained in:
commit
dce2eb03c0
1 changed files with 13 additions and 11 deletions
|
@ -32,6 +32,8 @@
|
|||
[svg-node]
|
||||
(let [image-nodes (dom/query-all svg-node "image:not([href^=data])")
|
||||
noop-fn (constantly nil)]
|
||||
(if (empty? image-nodes)
|
||||
(rx/of nil)
|
||||
(->> (rx/from image-nodes)
|
||||
(rx/mapcat
|
||||
(fn [image]
|
||||
|
@ -41,7 +43,7 @@
|
|||
(rx/mapcat wapi/read-file-as-data-url)
|
||||
(rx/tap (fn [data]
|
||||
(dom/set-attribute! image "href" data)))
|
||||
(rx/reduce noop-fn))))))))
|
||||
(rx/reduce noop-fn)))))))))
|
||||
|
||||
(defn- svg-as-data-url
|
||||
"Transforms SVG as data-url resolving any blob, http or https url to
|
||||
|
|
Loading…
Add table
Reference in a new issue