Make second animate argument of swup.scrollTo() optional
Rename scroll handler for consistency
How to disable scroll animations
// Disable scroll animation between pages
swup.hooks.before('visit:start', (visit) => visit.scroll.animate = false)
// Disable scroll animation on link to same page
swup.hooks.before('link:self', (visit) => visit.scroll.animate = false)
// Disable scroll animation on link to same page anchor
swup.hooks.before('link:anchor', (visit) => visit.scroll.animate = false)
Checks
[x] The PR is submitted to the master branch
[x] The code was linted before pushing (npm run lint)
Description
visit.scroll.animate
key and use it to determine whether to animate scrolling or notDrive-by improvement
animate
argument ofswup.scrollTo()
optionalHow to disable scroll animations
Checks
master
branchnpm run lint
)Additional information
Closes #63