0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

🔥 Remove unused and commented code.

This commit is contained in:
Andrey Antukh 2019-08-24 12:41:29 +02:00
parent 5af263c70e
commit afae00f660
2 changed files with 8 additions and 24 deletions

View file

@ -270,10 +270,7 @@
zoom (get-in state [:workspace pid :zoom])
flags (get-in state [:workspace pid :flags])
align? (refs/alignment-activated? flags)
stoper (->> (rx/filter stoper-event? stream)
(rx/take 1))
stoper (rx/filter stoper-event? stream)
mouse (->> (rx/sample 10 uws/mouse-position)
(rx/mapcat #(conditional-align % align?)))]
(rx/concat

View file

@ -217,29 +217,16 @@
(let [pt (gpt/point (.-clientX event)
(.-clientY event))
pt (translate-point-to-viewport pt)]
;; (prn "viewport:on-mouse-move" pt)
(st/emit! (uws/->PointerEvent :viewport pt (kbd/ctrl? event) (kbd/shift? event)))))
;; ;; ctrl? (kbd/ctrl? event)
;; ;; shift? (kbd/shift? event)
;; ;; event {:ctrl ctrl?
;; ;; :shift shift?
;; ;; :window-coords wpt
;; ;; :viewport-coords vpt}
;; ]
;; #_(st/emit! (uws/pointer-event wpt vpt ctrl? shift?))))
(st/emit! (uws/->PointerEvent :viewport pt
(kbd/ctrl? event)
(kbd/shift? event)))))
(on-mount []
(prn "viewport.on-mount" (:id page))
(let [
;; key1 (events/listen js/document EventType.MOUSEMOVE on-mousemove)
key2 (events/listen js/document EventType.KEYDOWN on-key-down)
key3 (events/listen js/document EventType.KEYUP on-key-up)]
(let [key1 (events/listen js/document EventType.KEYDOWN on-key-down)
key2 (events/listen js/document EventType.KEYUP on-key-up)]
(fn []
;; (events/unlistenByKey key1)
(events/unlistenByKey key2)
(events/unlistenByKey key3))))]
(events/unlistenByKey key1)
(events/unlistenByKey key2))))]
(mf/use-effect on-mount)
;; (prn "viewport.render" (:id page))