0
Fork 0
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:
Andrey Antukh 2016-01-26 22:27:25 +02:00
parent 77ec0e86d2
commit de5036bc9b
2 changed files with 13 additions and 10 deletions

View file

@ -41,7 +41,6 @@
[v]
(vector? v))
(v/defvalidator function
"Validats if `v` is function."
{:default-message-format "%s must be a function."}

View file

@ -100,6 +100,19 @@
(rx/buffer 2 1)
(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
(as-> mouse-delta-s $
(rx/filter #(deref shapes-dragging?) $)
@ -155,15 +168,6 @@
pos [x (+ y scroll)]]
(swap! selrect-pos assoc :current pos)))))))
;; Materialized views
(defonce mouse-position
(->> mouse-s
(rx/sample 50)
(rx/to-atom)))
(defonce bounding-rect (atom {}))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Constants
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;