mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 15:39:50 -05:00
🐛 Fix 404 error on fills
This commit is contained in:
parent
7962c104b6
commit
8d700491da
2 changed files with 6 additions and 3 deletions
|
@ -34,6 +34,7 @@
|
|||
(rx/map identity obs)))
|
||||
|
||||
sub (->> (rx/from urls)
|
||||
(rx/filter some?)
|
||||
(url-mapping)
|
||||
(rx/reduce conj {})
|
||||
(rx/subs (fn [data]
|
||||
|
|
|
@ -30,9 +30,11 @@
|
|||
(let [{:keys [x y width height]} (:selrect shape)
|
||||
{:keys [metadata]} shape
|
||||
|
||||
has-image (or metadata (:fill-image shape))
|
||||
uri (if metadata
|
||||
has-image? (or metadata (:fill-image shape))
|
||||
uri (cond
|
||||
metadata
|
||||
(cfg/resolve-file-media metadata)
|
||||
(:fill-image shape)
|
||||
(cfg/resolve-file-media (:fill-image shape)))
|
||||
embed (embed/use-data-uris [uri])
|
||||
transform (gsh/transform-matrix shape)
|
||||
|
@ -66,7 +68,7 @@
|
|||
(obj/set! "width" width)
|
||||
(obj/set! "height" height))])
|
||||
|
||||
(when has-image
|
||||
(when has-image?
|
||||
[:image {:xlinkHref (get embed uri uri)
|
||||
:width width
|
||||
:height height}])]])])))))
|
||||
|
|
Loading…
Add table
Reference in a new issue