Fix scrolling to top of board when navlinks are hidden. nebukazar/OneeChan#74

This commit is contained in:
ccd0 2016-01-30 01:20:41 -08:00
parent b71debdc56
commit f92a21e9ab

View File

@ -268,7 +268,8 @@ Index =
Index.update()
scrollToIndex: ->
Header.scrollToIfNeeded Index.navLinks
# Scroll to navlinks, or top of board if navlinks are hidden.
Header.scrollToIfNeeded (if Index.navLinks.getBoundingClientRect().height then Index.navLinks else Index.root)
getCurrentPage: ->
+window.location.pathname.split(/\/+/)[2] or 1