mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
⚡ Add minor performance improvement to get-viewer-frames
Reducing redundant lookups
This commit is contained in:
parent
b7eb20dc44
commit
0d0c5ed96c
1 changed files with 6 additions and 6 deletions
|
@ -320,12 +320,12 @@
|
|||
(get-viewer-frames objects nil))
|
||||
|
||||
([objects {:keys [all-frames?]}]
|
||||
(into []
|
||||
(comp (map (d/getf objects))
|
||||
(if all-frames?
|
||||
identity
|
||||
(remove :hide-in-viewer)))
|
||||
(sort-z-index objects (get-frames-ids objects)))))
|
||||
(->> (get-frames objects)
|
||||
(sort-z-index-objects objects)
|
||||
(into []
|
||||
(if all-frames?
|
||||
(map identity)
|
||||
(remove :hide-in-viewer))))))
|
||||
|
||||
(defn start-page-index
|
||||
[objects]
|
||||
|
|
Loading…
Add table
Reference in a new issue