0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-25 00:06:09 -05:00

🐛 Fix zip importer for none fills

This commit is contained in:
Alejandro Alonso 2023-08-08 13:16:26 +02:00 committed by Andrey Antukh
parent 695152274c
commit 937dd5a857

View file

@ -737,12 +737,13 @@
:fill-color-ref-file (get-meta fill-node :fill-color-ref-file uuid/uuid) :fill-color-ref-file (get-meta fill-node :fill-color-ref-file uuid/uuid)
:fill-color-ref-id (get-meta fill-node :fill-color-ref-id uuid/uuid) :fill-color-ref-id (get-meta fill-node :fill-color-ref-id uuid/uuid)
:fill-opacity (get-meta fill-node :fill-opacity d/parse-double)})) :fill-opacity (get-meta fill-node :fill-opacity d/parse-double)}))
(mapv d/without-nils))] (mapv d/without-nils)
(filterv #(not= (:fill-color %) "none")))]
(if (seq fills) (if (seq fills)
fills fills
(->> [(-> (add-fill {} node svg-data) (->> [(-> (add-fill {} node svg-data)
(d/without-nils))] (d/without-nils))]
(filterv not-empty))))) (filterv #(and (not-empty %) (not= (:fill-color %) "none")))))))
(defn parse-strokes (defn parse-strokes
[node svg-data] [node svg-data]
@ -761,12 +762,13 @@
:stroke-alignment (get-meta stroke-node :stroke-alignment keyword) :stroke-alignment (get-meta stroke-node :stroke-alignment keyword)
:stroke-cap-start (get-meta stroke-node :stroke-cap-start keyword) :stroke-cap-start (get-meta stroke-node :stroke-cap-start keyword)
:stroke-cap-end (get-meta stroke-node :stroke-cap-end keyword)})) :stroke-cap-end (get-meta stroke-node :stroke-cap-end keyword)}))
(mapv d/without-nils))] (mapv d/without-nils)
(filterv #(not= (:stroke-color %) "none")))]
(if (seq strokes) (if (seq strokes)
strokes strokes
(->> [(-> (add-stroke {} node svg-data) (->> [(-> (add-stroke {} node svg-data)
(d/without-nils))] (d/without-nils))]
(filterv #(and (not-empty %) (not= (:stroke-style %) :none))))))) (filterv #(and (not-empty %) (not= (:stroke-color %) "none") (not= (:stroke-style %) :none)))))))
(defn add-svg-content (defn add-svg-content
[props node] [props node]