From 89394bba1000ceb2af497e62b92547e6baf11551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Wed, 22 Jul 2020 08:17:33 +0200 Subject: [PATCH] :recycle: Add js hints --- .../src/uxbox/main/ui/workspace/context_menu.cljs | 2 +- frontend/src/uxbox/util/dom.cljs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/uxbox/main/ui/workspace/context_menu.cljs b/frontend/src/uxbox/main/ui/workspace/context_menu.cljs index c9483393e..7bf57ce2f 100644 --- a/frontend/src/uxbox/main/ui/workspace/context_menu.cljs +++ b/frontend/src/uxbox/main/ui/workspace/context_menu.cljs @@ -140,7 +140,7 @@ new-style (str "top: " (- top delta-y) "px; " "left: " (- left delta-x) "px;")] (when (or (> delta-x 0) (> delta-y 0)) - (.setAttribute dropdown "style" new-style)))))) + (.setAttribute ^js dropdown "style" new-style)))))) [:& dropdown {:show (boolean mdata) :on-close #(st/emit! dw/hide-context-menu)} diff --git a/frontend/src/uxbox/util/dom.cljs b/frontend/src/uxbox/util/dom.cljs index b071c7828..a1a480753 100644 --- a/frontend/src/uxbox/util/dom.cljs +++ b/frontend/src/uxbox/util/dom.cljs @@ -165,15 +165,15 @@ (defn get-bounding-rect [node] (let [rect (.getBoundingClientRect ^js node)] - {:left (.-left rect) - :top (.-top rect) - :right (.-right rect) - :bottom (.-bottom rect)})) + {:left (.-left ^js rect) + :top (.-top ^js rect) + :right (.-right ^js rect) + :bottom (.-bottom ^js rect)})) (defn get-window-size [] - {:width (.-innerWidth js/window) - :height (.-innerHeight js/window)}) + {:width (.-innerWidth ^js js/window) + :height (.-innerHeight ^js js/window)}) (defn focus! [node]