Improve text shape tracing process on exporter.

Fixes many bugs related to the svgo removal and remove
unneded neesting of groups.
This commit is contained in:
Andrey Antukh 2021-03-25 11:38:11 +01:00 committed by Alonso Torres
parent b1477d8087
commit c447279c75
4 changed files with 215 additions and 148 deletions

View file

@ -88,10 +88,8 @@
[shape]
(let [colors (->> (:content shape)
(tree-seq map? :children)
(into #{} (comp (map :fill-color) (filter string?))))]
(if (empty? colors)
"#000000"
(apply str (interpose "," colors)))))
(into #{"#000000"} (comp (map :fill-color) (filter string?))))]
(apply str (interpose "," colors))))
(mf/defc text-shape
{::mf/wrap-props false