0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Minor renaming for consistency.

This commit is contained in:
Andrey Antukh 2016-01-29 20:07:20 +02:00
parent 879cb09be1
commit e51adc2b5f
5 changed files with 6 additions and 14 deletions

View file

@ -43,7 +43,7 @@
(as-> (l/in [:workspace :flags]) $
(l/focus-atom $ st/state)))
(def ^:static shapes-by-id
(def ^:static shapes-by-id-l
(as-> (l/key :shapes-by-id) $
(l/focus-atom $ st/state)))

View file

@ -139,7 +139,7 @@
(defn- canvas-render
[own {:keys [width height id] :as page}]
(let [workspace (rum/react wb/workspace-l)
shapes-by-id (rum/react wb/shapes-by-id)
shapes-by-id (rum/react wb/shapes-by-id-l)
workspace-selected (:selected workspace)
xf (comp
(map #(get shapes-by-id %))

View file

@ -11,7 +11,7 @@
(letfn [(on-value [delta]
(let [pageid (get-in @st/state [:workspace :page])
selected (get-in @st/state [:workspace :selected])
shapes (->> (vals @wb/shapes-by-id)
shapes (->> (vals @wb/shapes-by-id-l)
(filter #(= (:page %) pageid))
(filter (comp selected :id)))]
(doseq [{:keys [id group]} shapes]

View file

@ -11,14 +11,6 @@
[uxbox.ui.dom :as dom]
[uxbox.ui.workspace.base :as wb]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lenses
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def ^:static ^:private shapes-by-id
(as-> (l/key :shapes-by-id) $
(l/focus-atom $ st/state)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Helpers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -48,7 +40,7 @@
(defn- recent-colors-render
[own {:keys [page id] :as shape} callback]
(let [shapes-by-id (rum/react shapes-by-id)
(let [shapes-by-id (rum/react wb/shapes-by-id-l)
shapes (->> (vals shapes-by-id)
(filter #(= (:page %) page)))
colors (calculate-colors shapes)]

View file

@ -125,7 +125,7 @@
toggle-open (fn [event]
(dom/stop-propagation event)
(swap! local assoc :open (not open?)))
shapes-by-id (rum/react wb/shapes-by-id)]
shapes-by-id (rum/react wb/shapes-by-id-l)]
(html
[:li.group {:class (when open? "open")}
[:div.element-list-body
@ -168,7 +168,7 @@
[own]
(let [workspace (rum/react wb/workspace-l)
selected (:selected workspace)
shapes-by-id (rum/react wb/shapes-by-id)
shapes-by-id (rum/react wb/shapes-by-id-l)
page (rum/react (focus-page (:page workspace)))
close #(rs/emit! (dw/toggle-toolbox :layers))
;; copy #(rs/emit! (dw/copy-selected))