mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
🔥 Remove deprecated code.
This commit is contained in:
parent
51541303a6
commit
a33689cbae
4 changed files with 9 additions and 14 deletions
|
@ -183,14 +183,10 @@
|
|||
(ptk/reify ::initialize-page
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
;; TODO: looks workspace-page is unused
|
||||
(let [page (get-in state [:workspace-data :pages-index page-id])
|
||||
local (get-in state [:workspace-cache page-id] workspace-local-default)]
|
||||
(let [local (get-in state [:workspace-cache page-id] workspace-local-default)]
|
||||
(assoc state
|
||||
:current-page-id page-id ; mainly used by events
|
||||
:workspace-page page
|
||||
:workspace-local local
|
||||
)))))
|
||||
:workspace-local local)))))
|
||||
|
||||
(defn finalize-page
|
||||
[page-id]
|
||||
|
@ -201,7 +197,7 @@
|
|||
(let [local (:workspace-local state)]
|
||||
(-> state
|
||||
(assoc-in [:workspace-cache page-id] local)
|
||||
(dissoc :current-page-id :workspace-page))))))
|
||||
(dissoc :current-page-id))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Workspace Page CRUD
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
(ptk/reify ::rehash-shape-frame-relationship
|
||||
ptk/WatchEvent
|
||||
(watch [_ state stream]
|
||||
(let [page-id (get-in state [:workspace-page :id])
|
||||
(let [page-id (:current-page-id state)
|
||||
objects (lookup-page-objects state page-id)
|
||||
|
||||
shapes (cph/select-toplevel-shapes objects)
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
(def selected-objects
|
||||
(letfn [(selector [state]
|
||||
(let [selected (get-in state [:workspace-local :selected])
|
||||
page-id (get-in state [:workspace-page :id])
|
||||
page-id (:current-page-id state)
|
||||
objects (get-in state [:workspace-data :pages-index page-id :objects])]
|
||||
(mapv #(get objects %) selected)))]
|
||||
(l/derived selector st/state =)))
|
||||
|
@ -173,7 +173,7 @@
|
|||
(def selected-shapes-with-children
|
||||
(letfn [(selector [state]
|
||||
(let [selected (get-in state [:workspace-local :selected])
|
||||
page-id (get-in state [:workspace-page :id])
|
||||
page-id (:current-page-id state)
|
||||
objects (get-in state [:workspace-data :pages-index page-id :objects])
|
||||
children (mapcat #(cph/get-children % objects) selected)]
|
||||
(into selected children)))]
|
||||
|
@ -184,7 +184,7 @@
|
|||
(def selected-objects-with-children
|
||||
(letfn [(selector [state]
|
||||
(let [selected (get-in state [:workspace-local :selected])
|
||||
page-id (get-in state [:workspace-page :id])
|
||||
page-id (:current-page-id state)
|
||||
objects (get-in state [:workspace-data :pages-index page-id :objects])
|
||||
children (mapcat #(cph/get-children % objects) selected)
|
||||
shapes (into selected children)]
|
||||
|
|
|
@ -39,13 +39,12 @@
|
|||
|
||||
;; --- Right Sidebar (Component)
|
||||
|
||||
;; TODO: revisit page prop
|
||||
|
||||
(mf/defc right-sidebar
|
||||
[{:keys [layout page-id file-id local] :as props}]
|
||||
[:aside#settings-bar.settings-bar
|
||||
[:div.settings-bar-inside
|
||||
(when (contains? layout :element-options)
|
||||
[:& options-toolbox {:page-id page-id
|
||||
[:& options-toolbox
|
||||
{:page-id page-id
|
||||
:file-id file-id
|
||||
:local local}])]])
|
||||
|
|
Loading…
Add table
Reference in a new issue