mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
🔥 Remove unused and commented code.
This commit is contained in:
parent
5af263c70e
commit
afae00f660
2 changed files with 8 additions and 24 deletions
|
@ -270,10 +270,7 @@
|
||||||
zoom (get-in state [:workspace pid :zoom])
|
zoom (get-in state [:workspace pid :zoom])
|
||||||
flags (get-in state [:workspace pid :flags])
|
flags (get-in state [:workspace pid :flags])
|
||||||
align? (refs/alignment-activated? flags)
|
align? (refs/alignment-activated? flags)
|
||||||
|
stoper (rx/filter stoper-event? stream)
|
||||||
stoper (->> (rx/filter stoper-event? stream)
|
|
||||||
(rx/take 1))
|
|
||||||
|
|
||||||
mouse (->> (rx/sample 10 uws/mouse-position)
|
mouse (->> (rx/sample 10 uws/mouse-position)
|
||||||
(rx/mapcat #(conditional-align % align?)))]
|
(rx/mapcat #(conditional-align % align?)))]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
|
|
|
@ -217,29 +217,16 @@
|
||||||
(let [pt (gpt/point (.-clientX event)
|
(let [pt (gpt/point (.-clientX event)
|
||||||
(.-clientY event))
|
(.-clientY event))
|
||||||
pt (translate-point-to-viewport pt)]
|
pt (translate-point-to-viewport pt)]
|
||||||
;; (prn "viewport:on-mouse-move" pt)
|
(st/emit! (uws/->PointerEvent :viewport pt
|
||||||
(st/emit! (uws/->PointerEvent :viewport pt (kbd/ctrl? event) (kbd/shift? event)))))
|
(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?))))
|
|
||||||
|
|
||||||
(on-mount []
|
(on-mount []
|
||||||
(prn "viewport.on-mount" (:id page))
|
(let [key1 (events/listen js/document EventType.KEYDOWN on-key-down)
|
||||||
(let [
|
key2 (events/listen js/document EventType.KEYUP on-key-up)]
|
||||||
;; 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)]
|
|
||||||
(fn []
|
(fn []
|
||||||
;; (events/unlistenByKey key1)
|
(events/unlistenByKey key1)
|
||||||
(events/unlistenByKey key2)
|
(events/unlistenByKey key2))))]
|
||||||
(events/unlistenByKey key3))))]
|
|
||||||
|
|
||||||
(mf/use-effect on-mount)
|
(mf/use-effect on-mount)
|
||||||
;; (prn "viewport.render" (:id page))
|
;; (prn "viewport.render" (:id page))
|
||||||
|
|
Loading…
Add table
Reference in a new issue