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:
parent
8ded4811bb
commit
60f637e947
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue