0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00

🐛 Fix problem when closing paths for big imported SVGs

This commit is contained in:
alonso.torres 2023-04-10 16:51:05 +02:00 committed by Alejandro Alonso
parent 6972227b8d
commit dfb1a79179

View file

@ -983,10 +983,12 @@
(defn open-path?
[shape]
(and (= :path (:type shape))
(not (->> shape
:content
(sp/close-subpaths)
(sp/get-subpaths)
(every? sp/is-closed?)))))
(let [svg? (contains? shape :svg-attrs)
;; No close subpaths for svgs imported
maybe-close (if svg? identity sp/close-subpaths)]
(and (= :path (:type shape))
(not (->> shape
:content
(maybe-close)
(sp/get-subpaths)
(every? sp/is-closed?))))))