🐛 Fix some problems with scroll into view for layers

This commit is contained in:
alonso.torres 2022-02-01 13:36:12 +01:00
parent e352c70013
commit 8d4612c683
5 changed files with 21 additions and 17 deletions

View file

@ -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]