mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 01:38:27 +02:00
Denormalize shapes storage.
This commit is contained in:
parent
40bbc996f7
commit
a4fe43235b
7 changed files with 40 additions and 23 deletions
|
@ -27,6 +27,14 @@
|
|||
(dp/project-pages % pid))) $
|
||||
(l/focus-atom $ s/state)))
|
||||
|
||||
(def ^:static shapes-state
|
||||
(as-> (ul/getter (fn [state]
|
||||
(let [pid (get-in state [:workspace :page])
|
||||
shapes (->> (vals (:shapes-by-id state))
|
||||
(filter #(= (:page %) pid)))]
|
||||
(into [] shapes)))) $
|
||||
(l/focus-atom $ s/state)))
|
||||
|
||||
(def ^:static workspace-state
|
||||
(as-> (l/in [:workspace]) $
|
||||
(l/focus-atom $ s/state)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue