0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 17:18:21 -05:00

🐛 Don't allow create frames inside frames.

This commit is contained in:
Andrey Antukh 2020-12-02 14:34:47 +01:00 committed by Hirunatan
parent 44a21de783
commit e0cc0a7f3a
2 changed files with 7 additions and 2 deletions

View file

@ -532,8 +532,12 @@
unames (retrieve-used-names objects)
name (generate-unique-name unames (:name shape))
frame-id (or (:frame-id attrs)
(cph/frame-id-by-position objects attrs))
frame-id (if (= :frame (:type attrs))
uuid/zero
(or (:frame-id attrs)
(cph/frame-id-by-position objects attrs)))
shape (merge
(if (= :frame (:type shape))

View file

@ -154,6 +154,7 @@
(geom/translate-to-frame frame))
opts #js {:shape shape}]
(case (:type shape)
:frame [:g.empty]
:text [:> text-wrapper opts]
:rect [:> rect-wrapper opts]
:path [:> path-wrapper opts]