mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 01:16:11 +02:00
💄 Fix minor cosmetic issues on components-v2 feature ns
This commit is contained in:
parent
295d9568c8
commit
9ca7c4280c
1 changed files with 4 additions and 8 deletions
|
@ -185,12 +185,10 @@
|
||||||
fix-missing-image-metadata
|
fix-missing-image-metadata
|
||||||
(fn [file-data]
|
(fn [file-data]
|
||||||
;; Delete broken image shapes with no metadata.
|
;; Delete broken image shapes with no metadata.
|
||||||
(letfn [(fix-container
|
(letfn [(fix-container [container]
|
||||||
[container]
|
|
||||||
(d/update-when container :objects #(reduce-kv fix-shape % %)))
|
(d/update-when container :objects #(reduce-kv fix-shape % %)))
|
||||||
|
|
||||||
(fix-shape
|
(fix-shape [objects id shape]
|
||||||
[objects id shape]
|
|
||||||
(if (and (cfh/image-shape? shape)
|
(if (and (cfh/image-shape? shape)
|
||||||
(nil? (:metadata shape)))
|
(nil? (:metadata shape)))
|
||||||
(-> objects
|
(-> objects
|
||||||
|
@ -435,12 +433,10 @@
|
||||||
(fn [file-data]
|
(fn [file-data]
|
||||||
;; Find children shapes whose parent-id is not set to the parent that contains them.
|
;; Find children shapes whose parent-id is not set to the parent that contains them.
|
||||||
;; Remove them from the parent :shapes list.
|
;; Remove them from the parent :shapes list.
|
||||||
(letfn [(fix-container
|
(letfn [(fix-container [container]
|
||||||
[container]
|
|
||||||
(d/update-when container :objects #(reduce-kv fix-shape % %)))
|
(d/update-when container :objects #(reduce-kv fix-shape % %)))
|
||||||
|
|
||||||
(fix-shape
|
(fix-shape [objects id shape]
|
||||||
[objects id shape]
|
|
||||||
(reduce (fn [objects child-id]
|
(reduce (fn [objects child-id]
|
||||||
(let [child (get objects child-id)]
|
(let [child (get objects child-id)]
|
||||||
(cond-> objects
|
(cond-> objects
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue