mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 07:31:38 +02:00
🐛 Fix path with images on binfile importation
This commit is contained in:
parent
1b42e324a2
commit
c1348189d4
1 changed files with 6 additions and 1 deletions
|
@ -728,11 +728,16 @@
|
||||||
[data]
|
[data]
|
||||||
(letfn [(process-map-form [form]
|
(letfn [(process-map-form [form]
|
||||||
(cond-> form
|
(cond-> form
|
||||||
;; Relink Image Shapes
|
;; Relink image shapes
|
||||||
(and (map? (:metadata form))
|
(and (map? (:metadata form))
|
||||||
(= :image (:type form)))
|
(= :image (:type form)))
|
||||||
(update-in [:metadata :id] lookup-index)
|
(update-in [:metadata :id] lookup-index)
|
||||||
|
|
||||||
|
;; Relink paths with fill image
|
||||||
|
(and (map? (:fill-image form))
|
||||||
|
(= :path (:type form)))
|
||||||
|
(update-in [:fill-image :id] lookup-index)
|
||||||
|
|
||||||
;; This covers old shapes and the new :fills.
|
;; This covers old shapes and the new :fills.
|
||||||
(uuid? (:fill-color-ref-file form))
|
(uuid? (:fill-color-ref-file form))
|
||||||
(update :fill-color-ref-file lookup-index)
|
(update :fill-color-ref-file lookup-index)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue