mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 08:08:23 +02:00
🐛 Convert in copies nested main instances when duplicating
This commit is contained in:
parent
69435e32d9
commit
5fb4703d95
2 changed files with 37 additions and 6 deletions
|
@ -163,12 +163,17 @@
|
|||
result))))
|
||||
|
||||
(defn get-parent-ids-seq
|
||||
"Returns a vector of parents of the specified shape."
|
||||
"Returns a sequence of parents of the specified shape."
|
||||
[objects shape-id]
|
||||
(let [parent-id (get-parent-id objects shape-id)]
|
||||
(when (and (some? parent-id) (not= parent-id shape-id))
|
||||
(lazy-seq (cons parent-id (get-parent-ids-seq objects parent-id))))))
|
||||
|
||||
(defn get-parent-ids-seq-with-self
|
||||
"Returns a sequence of parents of the specified shape, including itself."
|
||||
[objects shape-id]
|
||||
(cons shape-id (get-parent-ids-seq objects shape-id)))
|
||||
|
||||
(defn get-parents
|
||||
"Returns a vector of parents of the specified shape."
|
||||
[objects shape-id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue