mirror of
https://github.com/penpot/penpot.git
synced 2025-02-04 21:38:53 -05:00
⚡ Add micro optimization to is-direct-child-of-root?
helper
This commit is contained in:
parent
58f788455f
commit
82f1b96503
1 changed files with 4 additions and 3 deletions
|
@ -29,9 +29,10 @@
|
||||||
(defn is-direct-child-of-root?
|
(defn is-direct-child-of-root?
|
||||||
([objects id]
|
([objects id]
|
||||||
(is-direct-child-of-root? (get objects id)))
|
(is-direct-child-of-root? (get objects id)))
|
||||||
([{:keys [frame-id type]}]
|
([shape]
|
||||||
(and (= type :frame)
|
(and (some? shape)
|
||||||
(= frame-id uuid/zero))))
|
(= (dm/get-prop shape :type) :frame)
|
||||||
|
(= (dm/get-prop shape :frame-id) uuid/zero))))
|
||||||
|
|
||||||
(defn frame-shape?
|
(defn frame-shape?
|
||||||
([objects id]
|
([objects id]
|
||||||
|
|
Loading…
Add table
Reference in a new issue