mirror of
https://github.com/penpot/penpot.git
synced 2025-02-11 01:28:30 -05:00
🐛 Don't allow create frames inside frames.
This commit is contained in:
parent
44a21de783
commit
e0cc0a7f3a
2 changed files with 7 additions and 2 deletions
|
@ -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))
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue