Add fixed position in viewer

This commit is contained in:
Andrés Moya 2022-03-30 15:31:42 +02:00 committed by Eva
parent c9937f6b91
commit b68fdee946
10 changed files with 172 additions and 125 deletions

View file

@ -127,8 +127,18 @@
(when (some? node)
(.getAttribute ^js node attr-name)))
(defn get-scroll-position
[^js event]
(when (some? event)
{:scroll-height (.-scrollHeight event)
:scroll-left (.-scrollLeft event)
:scroll-top (.-scrollTop event)
:scroll-width (.-scrollWidth event)}))
(def get-target-val (comp get-value get-target))
(def get-target-scroll (comp get-scroll-position get-target))
(defn click
"Click a node"
[^js node]