mirror of
https://github.com/penpot/penpot.git
synced 2026-03-28 22:32:01 +01:00
🐛 Convert in copies nested main instances when duplicating
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user