Merge branch 'master' of github.com:lefuturiste/condorcet-associations-server into master
This commit is contained in:
commit
3ec125c29f
5 changed files with 32 additions and 3 deletions
|
|
@ -344,7 +344,10 @@ function renderMosaic(data) {
|
|||
mosaic.appendChild(cardContainer)
|
||||
}
|
||||
|
||||
const scrollPointStorageKey = 'fva_scroll_point'
|
||||
|
||||
window.onscroll = () => {
|
||||
window.sessionStorage[scrollPointStorageKey] = window.scrollY()
|
||||
if (focusPoint != null && isVisible(focusPoint) && !rendering) {
|
||||
if (page + 1 < pageCount + 1) {
|
||||
page++
|
||||
|
|
@ -353,6 +356,12 @@ window.onscroll = () => {
|
|||
}
|
||||
}
|
||||
|
||||
if (window.sessionStorage[scrollPointStorageKey] != null) {
|
||||
let s = parseInt(window.sessionStorage[scrollPointStorageKey])
|
||||
console.log(s)
|
||||
window.scrollTo(0, s)
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch tags and register click handler
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue