mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 16:07:24 +02:00
✨ Add fixed position in viewer
This commit is contained in:
parent
c9937f6b91
commit
b68fdee946
10 changed files with 172 additions and 125 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue