0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-21 04:01:24 -05:00

🐛 Fix broken text shapes without position-data on comp-v2 migration

This commit is contained in:
Andrey Antukh 2024-02-09 09:17:14 +01:00 committed by Andrés Moya
parent 6d35cb2eb4
commit ec2eb3d406

View file

@ -376,6 +376,19 @@
:selrect selrect
:points points))
(and (cfh/text-shape? shape)
(valid-text-content? (:content shape))
(not (valid-shape-points? (:points shape)))
(grc/valid-rect? (:selrect shape)))
(let [selrect (:selrect shape)
points (grc/rect->points selrect)]
(assoc shape
:x (:x selrect)
:y (:y selrect)
:width (:width selrect)
:height (:height selrect)
:points points))
(and (or (cfh/rect-shape? shape)
(cfh/svg-raw-shape? shape)
(cfh/circle-shape? shape))