mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
⚡ Advanced frame thumbnail handling
This commit is contained in:
parent
b576ef02af
commit
6a3a460203
19 changed files with 613 additions and 662 deletions
|
@ -263,6 +263,14 @@
|
|||
[ids]
|
||||
(l/derived #(into [] (keep (d/getf %)) ids) workspace-page-objects =))
|
||||
|
||||
(defn children-objects
|
||||
[id]
|
||||
(l/derived
|
||||
(fn [objects]
|
||||
(let [children-ids (get-in objects [id :shapes])]
|
||||
(into [] (keep (d/getf objects)) children-ids)))
|
||||
workspace-page-objects =))
|
||||
|
||||
(def workspace-page-options
|
||||
(l/derived :options workspace-page))
|
||||
|
||||
|
@ -386,3 +394,10 @@
|
|||
(l/derived (fn [state]
|
||||
(dm/get-in state [:viewer-local :fullscreen?]))
|
||||
st/state))
|
||||
|
||||
(def thumbnail-data
|
||||
(l/derived #(get-in % [:workspace-file :thumbnails] {}) st/state))
|
||||
|
||||
(defn thumbnail-frame-data
|
||||
[frame-id]
|
||||
(l/derived #(get % frame-id) thumbnail-data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue