mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -05:00
⚡ Add micro optimization to cph/root? predicate
accessing directly to the prop instead of using the lookup operation
This commit is contained in:
parent
8d46271e9d
commit
4a4423da70
1 changed files with 3 additions and 2 deletions
|
@ -22,8 +22,9 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defn root?
|
(defn root?
|
||||||
[{:keys [id type]}]
|
[shape]
|
||||||
(and (= type :frame) (= id uuid/zero)))
|
(and (= (dm/get-prop shape :type) :frame)
|
||||||
|
(= (dm/get-prop shape :id) uuid/zero)))
|
||||||
|
|
||||||
(defn root-frame?
|
(defn root-frame?
|
||||||
([objects id]
|
([objects id]
|
||||||
|
|
Loading…
Add table
Reference in a new issue