mirror of
https://github.com/penpot/penpot.git
synced 2025-07-30 12:48:30 +02:00
🐛 Fix some problems with scroll into view for layers
This commit is contained in:
parent
e352c70013
commit
8d4612c683
5 changed files with 21 additions and 17 deletions
|
@ -407,22 +407,19 @@
|
|||
|
||||
(defn scroll-into-view!
|
||||
([^js element]
|
||||
(when (some? element)
|
||||
(.scrollIntoView element false)))
|
||||
(scroll-into-view! element false))
|
||||
|
||||
([^js element scroll-top]
|
||||
([^js element options]
|
||||
(when (some? element)
|
||||
(.scrollIntoView element scroll-top))))
|
||||
(.scrollIntoView element options))))
|
||||
|
||||
(defn scroll-into-view-if-needed!
|
||||
([^js element]
|
||||
(.log js/console "SCROLL INTO VIEW" element)
|
||||
(when (some? element)
|
||||
(.scrollIntoViewIfNeeded ^js element false)))
|
||||
(scroll-into-view-if-needed! element false))
|
||||
|
||||
([^js element scroll-top]
|
||||
([^js element options]
|
||||
(when (some? element)
|
||||
(.scrollIntoViewIfNeeded ^js element scroll-top))))
|
||||
(.scrollIntoViewIfNeeded ^js element options))))
|
||||
|
||||
(defn is-in-viewport?
|
||||
[^js element]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue