parent
05656af0b9
commit
2858a0ff6c
|
@ -325,6 +325,9 @@
|
|||
pin-to-bottom? (r/atom true)
|
||||
selected-tab (r/atom :traces)
|
||||
window-width (r/atom js/window.innerWidth)
|
||||
handle-window-resize (fn [e]
|
||||
;; N.B. I don't think this should be a perf bottleneck.
|
||||
(reset! window-width js/window.innerWidth))
|
||||
handle-keys (fn [e]
|
||||
(let [combo-key? (or (.-ctrlKey e) (.-metaKey e) (.-altKey e))
|
||||
tag-name (.-tagName (.-target e))
|
||||
|
@ -359,11 +362,13 @@
|
|||
(toggle-traces showing?)
|
||||
(js/window.addEventListener "keydown" handle-keys)
|
||||
(js/window.addEventListener "mousemove" handle-mousemove)
|
||||
(js/window.addEventListener "mouseup" handle-mouse-up))
|
||||
(js/window.addEventListener "mouseup" handle-mouse-up)
|
||||
(js/window.addEventListener "resize" handle-window-resize))
|
||||
:component-will-unmount (fn []
|
||||
(js/window.removeEventListener "keydown" handle-keys)
|
||||
(js/window.removeEventListener "mousemove" handle-mousemove)
|
||||
(js/window.removeEventListener "mouseup" handle-mouse-up))
|
||||
(js/window.removeEventListener "mouseup" handle-mouse-up)
|
||||
(js/window.removeEventListener "resize" handle-window-resize))
|
||||
:display-name "devtools outer"
|
||||
:reagent-render (fn []
|
||||
(let [draggable-area 10
|
||||
|
|
Loading…
Reference in New Issue