mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 16:39:49 -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?
|
||||
([objects id]
|
||||
(is-direct-child-of-root? (get objects id)))
|
||||
([{:keys [frame-id type]}]
|
||||
(and (= type :frame)
|
||||
(= frame-id uuid/zero))))
|
||||
([shape]
|
||||
(and (some? shape)
|
||||
(= (dm/get-prop shape :type) :frame)
|
||||
(= (dm/get-prop shape :frame-id) uuid/zero))))
|
||||
|
||||
(defn frame-shape?
|
||||
([objects id]
|
||||
|
|
Loading…
Add table
Reference in a new issue