mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
Minor code reorg on workspace base ns.
This commit is contained in:
parent
77ec0e86d2
commit
de5036bc9b
2 changed files with 13 additions and 10 deletions
|
@ -41,7 +41,6 @@
|
||||||
[v]
|
[v]
|
||||||
(vector? v))
|
(vector? v))
|
||||||
|
|
||||||
|
|
||||||
(v/defvalidator function
|
(v/defvalidator function
|
||||||
"Validats if `v` is function."
|
"Validats if `v` is function."
|
||||||
{:default-message-format "%s must be a function."}
|
{:default-message-format "%s must be a function."}
|
||||||
|
|
|
@ -100,6 +100,19 @@
|
||||||
(rx/buffer 2 1)
|
(rx/buffer 2 1)
|
||||||
(rx/map coords-delta)))
|
(rx/map coords-delta)))
|
||||||
|
|
||||||
|
;; Materialized views
|
||||||
|
|
||||||
|
(defonce mouse-position
|
||||||
|
(->> mouse-s
|
||||||
|
(rx/sample 50)
|
||||||
|
(rx/to-atom)))
|
||||||
|
|
||||||
|
(defonce bounding-rect (atom {}))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Subscriptions
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(define-once :mouse-subscriptions
|
(define-once :mouse-subscriptions
|
||||||
(as-> mouse-delta-s $
|
(as-> mouse-delta-s $
|
||||||
(rx/filter #(deref shapes-dragging?) $)
|
(rx/filter #(deref shapes-dragging?) $)
|
||||||
|
@ -155,15 +168,6 @@
|
||||||
pos [x (+ y scroll)]]
|
pos [x (+ y scroll)]]
|
||||||
(swap! selrect-pos assoc :current pos)))))))
|
(swap! selrect-pos assoc :current pos)))))))
|
||||||
|
|
||||||
;; Materialized views
|
|
||||||
|
|
||||||
(defonce mouse-position
|
|
||||||
(->> mouse-s
|
|
||||||
(rx/sample 50)
|
|
||||||
(rx/to-atom)))
|
|
||||||
|
|
||||||
(defonce bounding-rect (atom {}))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Constants
|
;; Constants
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue