mirror of
https://github.com/penpot/penpot.git
synced 2026-05-08 09:38:43 +00:00
⚡ Add micro optimization to is-direct-child-of-root? helper
This commit is contained in:
parent
58f788455f
commit
82f1b96503
@ -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…
x
Reference in New Issue
Block a user