mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 01:01:37 +02:00
♻️ Refactor workspace thumbails (again)
We probably need a counter of number of types this code was refactored hehe
This commit is contained in:
parent
4ac2a64a2a
commit
d0c1a9683a
11 changed files with 290 additions and 275 deletions
|
@ -475,15 +475,12 @@
|
|||
(dm/get-in state [:viewer-local :zoom-type]))
|
||||
st/state))
|
||||
|
||||
(def thumbnail-data
|
||||
(l/derived #(get % :workspace-thumbnails {}) st/state))
|
||||
|
||||
(defn thumbnail-frame-data
|
||||
[frame-id]
|
||||
(defn workspace-thumbnail-by-id
|
||||
[object-id]
|
||||
(l/derived
|
||||
(fn [thumbnails]
|
||||
(get thumbnails (dm/str frame-id)))
|
||||
thumbnail-data))
|
||||
(fn [state]
|
||||
(dm/get-in state [:workspace-thumbnails object-id]))
|
||||
st/state))
|
||||
|
||||
(def workspace-text-modifier
|
||||
(l/derived :workspace-text-modifier st/state))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue