🔥 Remove unused code.

This commit is contained in:
Andrey Antukh 2019-09-21 20:13:14 +02:00
parent abc1406f4d
commit 163e102bcf
6 changed files with 10 additions and 239 deletions

View file

@ -8,6 +8,7 @@
(:require
[lentes.core :as l]
[rumext.alpha :as mf]
[uxbox.main.refs :as refs]
[uxbox.main.store :as st]
[uxbox.main.ui.shapes.circle :as circle]
[uxbox.main.ui.shapes.icon :as icon]

View file

@ -220,13 +220,9 @@
shape (geom/selection-rect shape)]
[:& controls {:shape shape :zoom zoom :on-click on-click}]))
(def ^:private shapes-map-iref
(-> (l/key :shapes)
(l/derive st/state)))
(mf/defc selection-handlers
[{:keys [wst] :as props}]
(let [shapes-map (mf/deref shapes-map-iref)
(let [shapes-map (mf/deref refs/shapes-by-id)
shapes (map #(get shapes-map %) (:selected wst))
edition (:edition wst)
zoom (:zoom wst 1)

View file

@ -88,8 +88,7 @@
(ptk/reify ::handle-selrect
ptk/WatchEvent
(watch [_ state stream]
(let [stoper (->> (rx/filter #(or (dw/interrupt? %) (uws/mouse-up? %)) stream)
(rx/pr-log "handle-selrect|stoper:"))]
(let [stoper (rx/filter #(or (dw/interrupt? %) (uws/mouse-up? %)) stream)]
(rx/concat
(rx/of (dw/deselect-all))
(->> uws/mouse-position
@ -227,8 +226,8 @@
(fn []
(events/unlistenByKey key1)
(events/unlistenByKey key2))))]
(mf/use-effect on-mount)
;; (prn "viewport$render")
[:*
[:& coordinates {:zoom zoom}]
#_[:div.tooltip-container