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:
parent
5af263c70e
commit
afae00f660
2 changed files with 8 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue