[web-src] Reduce timeout for scroll behavior to 10 ms

This commit is contained in:
chme 2018-12-19 11:47:35 +01:00
parent eefacbbf55
commit f8f23ced86

View File

@ -213,7 +213,7 @@ export const router = new VueRouter({
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(savedPosition)
}, 500)
}, 10)
})
} else if (to.path === from.path && to.hash) {
return { selector: to.hash, offset: { x: 0, y: 90 } }
@ -221,13 +221,13 @@ export const router = new VueRouter({
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ selector: to.hash, offset: { x: 0, y: 90 } })
}, 500)
}, 10)
})
} else if (to.meta.has_index) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ selector: '#top', offset: { x: 0, y: 110 } })
}, 500)
}, 10)
})
} else {
return { x: 0, y: 0 }