0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-26 00:19:07 -05:00

🔥 Remove unnecesary ref, viewport already has access to all local data

This commit is contained in:
Andrey Antukh 2022-07-28 08:26:02 +02:00
parent 1fa25060a0
commit 5834e29b39
2 changed files with 1 additions and 4 deletions

View file

@ -117,9 +117,6 @@
(wsh/process-selected-shapes objects selected)) (wsh/process-selected-shapes objects selected))
selected-shapes-data)) selected-shapes-data))
(def highlighted-shapes
(l/derived :highlighted workspace-local))
(defn make-selected-ref (defn make-selected-ref
[id] [id]
(l/derived #(contains? % id) selected-shapes)) (l/derived #(contains? % id) selected-shapes))

View file

@ -53,6 +53,7 @@
panning panning
selrect selrect
transform transform
highlighted
vbox vbox
vport vport
zoom zoom
@ -70,7 +71,6 @@
drawing (mf/deref refs/workspace-drawing) drawing (mf/deref refs/workspace-drawing)
options (mf/deref refs/workspace-page-options) options (mf/deref refs/workspace-page-options)
focus (mf/deref refs/workspace-focus-selected) focus (mf/deref refs/workspace-focus-selected)
highlighted (mf/deref refs/highlighted-shapes)
objects-ref (mf/use-memo #(refs/workspace-page-objects-by-id page-id)) objects-ref (mf/use-memo #(refs/workspace-page-objects-by-id page-id))
objects (mf/deref objects-ref) objects (mf/deref objects-ref)