0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

Add parent property to shapes

This commit is contained in:
alonso.torres 2024-07-11 12:40:40 +02:00
parent 8ded4811bb
commit 60f637e947

View file

@ -819,6 +819,13 @@
:else
(st/emit! (dw/update-position id {:y value})))))}
{:name "parent"
;; not enumerable so there are no infinite loops
:enumerable false
:get (fn [self]
(let [shape (u/proxy->shape self)
parent-id (:parent-id shape)]
(shape-proxy (obj/get self "$file") (obj/get self "$page") parent-id)))}
{:name "parentX"
:get (fn [self]
(let [shape (u/proxy->shape self)