Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ The following settings are editable to overwrite the default.
//
// Sets the easing type for the scroll animation that is triggered by the
// click event on a nav item, by default it's 'easeOutQuad'.
// To disable scrolling animation, choose 'none'.
//
// available options are 'linear' 'easeInQuad', 'easeOutQuad',
// 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic',
// 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInQuint',
// 'easeOutQuint', easeInOutQuint
// 'easeOutQuint', easeInOutQuint, 'none'

updateHistory: true
// boolean
Expand Down
477 changes: 476 additions & 1 deletion dist/scrollnav.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scrollnav.min.js.map

Large diffs are not rendered by default.

484 changes: 483 additions & 1 deletion dist/scrollnav.min.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scrollnav.min.umd.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/scrollTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export default function scrollTo(targetPosition, easingStyle) {
}
}

animateScroll();
if (easingStyle == 'none') {
window.scroll(0, targetPosition);
} else {
animateScroll();
}
});
}
4 changes: 1 addition & 3 deletions src/scrollnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ function init(elem, options) {
if (this.settings.debug) {
// eslint-disable-next-line no-console
console.error(`
scrollnav build failed, options.insertLocation "${
this.settings.insertLocation
}" is not a valid option
scrollnav build failed, options.insertLocation "${this.settings.insertLocation}" is not a valid option
`);
}
return;
Expand Down
138 changes: 70 additions & 68 deletions test/coverage/clover.xml

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions test/coverage/coverage-final.json

Large diffs are not rendered by default.

Loading