mirror of
https://github.com/penpot/penpot.git
synced 2026-05-03 23:29:03 +00:00
⚡ Add minor performance improvement to get-viewer-frames
Reducing redundant lookups
This commit is contained in:
parent
b7eb20dc44
commit
0d0c5ed96c
@ -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…
x
Reference in New Issue
Block a user