mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
Minor code cleaning.
This commit is contained in:
parent
24ae745da0
commit
3dd0d840d9
1 changed files with 5 additions and 11 deletions
|
@ -31,14 +31,14 @@
|
||||||
(as-> (l/in [:workspace]) $
|
(as-> (l/in [:workspace]) $
|
||||||
(l/focus-atom $ st/state)))
|
(l/focus-atom $ st/state)))
|
||||||
|
|
||||||
(def ^:static toolboxes-l
|
|
||||||
(as-> (l/in [:workspace :toolboxes]) $
|
|
||||||
(l/focus-atom $ st/state)))
|
|
||||||
|
|
||||||
(def ^:static selected-shapes-l
|
(def ^:static selected-shapes-l
|
||||||
(as-> (l/in [:workspace :selected]) $
|
(as-> (l/in [:workspace :selected]) $
|
||||||
(l/focus-atom $ st/state)))
|
(l/focus-atom $ st/state)))
|
||||||
|
|
||||||
|
(def ^:static toolboxes-l
|
||||||
|
(as-> (l/in [:workspace :toolboxes]) $
|
||||||
|
(l/focus-atom $ st/state)))
|
||||||
|
|
||||||
(def ^:static flags-l
|
(def ^:static flags-l
|
||||||
(as-> (l/in [:workspace :flags]) $
|
(as-> (l/in [:workspace :flags]) $
|
||||||
(l/focus-atom $ st/state)))
|
(l/focus-atom $ st/state)))
|
||||||
|
@ -75,8 +75,6 @@
|
||||||
;; Interactions
|
;; Interactions
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;; (defonce shapes-dragging? (atom false))
|
|
||||||
;; (defonce selrect-dragging? (atom false))
|
|
||||||
(defonce interactions-b (rx/bus))
|
(defonce interactions-b (rx/bus))
|
||||||
|
|
||||||
(defn emit-interaction!
|
(defn emit-interaction!
|
||||||
|
@ -93,8 +91,6 @@
|
||||||
(rx/filter #(= (:id %) (:id @page-l)))
|
(rx/filter #(= (:id %) (:id @page-l)))
|
||||||
(rx/map :coords)))
|
(rx/map :coords)))
|
||||||
|
|
||||||
;; Deltas
|
|
||||||
|
|
||||||
(defn- coords-delta
|
(defn- coords-delta
|
||||||
[[old new]]
|
[[old new]]
|
||||||
(let [[oldx oldy] old
|
(let [[oldx oldy] old
|
||||||
|
@ -108,11 +104,9 @@
|
||||||
(rx/buffer 2 1)
|
(rx/buffer 2 1)
|
||||||
(rx/map coords-delta)))
|
(rx/map coords-delta)))
|
||||||
|
|
||||||
;; Materialized views
|
|
||||||
|
|
||||||
(defonce mouse-position
|
(defonce mouse-position
|
||||||
(->> mouse-s
|
(->> mouse-s
|
||||||
(rx/sample 50)
|
(rx/sample 10)
|
||||||
(rx/to-atom)))
|
(rx/to-atom)))
|
||||||
|
|
||||||
(defonce bounding-rect (atom {}))
|
(defonce bounding-rect (atom {}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue