mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 21:06:11 -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
|
:else
|
||||||
(st/emit! (dw/update-position id {:y value})))))}
|
(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"
|
{:name "parentX"
|
||||||
:get (fn [self]
|
:get (fn [self]
|
||||||
(let [shape (u/proxy->shape self)
|
(let [shape (u/proxy->shape self)
|
||||||
|
|
Loading…
Add table
Reference in a new issue