Fix scrolling

pull/645/head
Tienson Qin 2020-05-22 15:38:23 +08:00
parent 155fdac317
commit f530e901b4
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,7 @@
;; scroll
(defn main-node
[]
(gdom/getElement "main-content"))
(gdom/getElement "main"))
(defn get-scroll-top []
(.-scrollTop (main-node)))
@ -172,6 +172,7 @@
scroll-top (gobj/get node "scrollTop")
client-height (gobj/get node "clientHeight")
bottom-reached? (<= (- full-height scroll-top client-height) 700)]
(prn (- full-height scroll-top client-height))
(when bottom-reached?
(on-load))))