mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 17:17:13 +02:00
♻️ Rename helper root-frame? to is-direct-child-of-root?
This commit is contained in:
parent
35f931c05a
commit
577c2b39dc
11 changed files with 21 additions and 21 deletions
|
@ -30,7 +30,7 @@
|
|||
(not (ctl/layout-absolute? shape))
|
||||
(or (cph/group-shape? shape)
|
||||
(cph/frame-shape? shape)))
|
||||
(cph/root-frame? shape))
|
||||
(cph/is-direct-child-of-root? shape))
|
||||
:relative
|
||||
|
||||
(and (ctl/any-layout-immediate-child? objects shape)
|
||||
|
@ -54,14 +54,14 @@
|
|||
;;shape (gsh/transform-shape)
|
||||
shape-value (get selrect coord)
|
||||
]
|
||||
(when (and (not (cph/root-frame? shape))
|
||||
(when (and (not (cph/is-direct-child-of-root? shape))
|
||||
(or (not (ctl/any-layout-immediate-child? objects shape))
|
||||
(ctl/layout-absolute? shape)))
|
||||
(- shape-value parent-value))))
|
||||
|
||||
#_(defn get-shape-position
|
||||
[shape objects coord]
|
||||
(when-not (or (cph/root-frame? shape)
|
||||
(when-not (or (cph/is-direct-child-of-root? shape)
|
||||
(and (ctl/any-layout-immediate-child? objects shape)
|
||||
(not (ctl/layout-absolute? shape))))
|
||||
(let [parent (get objects (:parent-id shape))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue