mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 12:59:12 -05:00
🐛 Fix minor issues on page helpers
This commit is contained in:
parent
8fd908a59f
commit
8237805cf5
1 changed files with 8 additions and 10 deletions
|
@ -161,8 +161,7 @@
|
||||||
(defn get-frames
|
(defn get-frames
|
||||||
"Retrieves all frame objects as vector"
|
"Retrieves all frame objects as vector"
|
||||||
[objects]
|
[objects]
|
||||||
(if (contains? (meta objects) ::index-frames)
|
(or (-> objects meta ::index-frames)
|
||||||
(::index-frames (meta objects))
|
|
||||||
(let [lookup (d/getf objects)
|
(let [lookup (d/getf objects)
|
||||||
xform (comp (remove #(= uuid/zero %))
|
xform (comp (remove #(= uuid/zero %))
|
||||||
(keep lookup)
|
(keep lookup)
|
||||||
|
@ -704,11 +703,10 @@
|
||||||
(into []
|
(into []
|
||||||
(comp (map (d/getf objects))
|
(comp (map (d/getf objects))
|
||||||
(if all-frames?
|
(if all-frames?
|
||||||
identity
|
(map identity)
|
||||||
(remove :hide-in-viewer)))
|
(remove :hide-in-viewer)))
|
||||||
(sort-z-index objects (get-frames-ids objects) {:top-frames? true}))))
|
(sort-z-index objects (get-frames-ids objects) {:top-frames? true}))))
|
||||||
|
|
||||||
|
|
||||||
(defn start-page-index
|
(defn start-page-index
|
||||||
[objects]
|
[objects]
|
||||||
(with-meta objects {::index-frames (get-frames (with-meta objects nil))}))
|
(with-meta objects {::index-frames (get-frames (with-meta objects nil))}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue