Browse Source

Fix unneeded scroll event

master
Eduard Kuzmenko 3 years ago
parent
commit
77d48d764d
  1. 5
      src/helpers/fastSmoothScroll.ts

5
src/helpers/fastSmoothScroll.ts

@ -151,6 +151,11 @@ function scrollWithJs(options: ScrollOptions): Promise<void> {
break; break;
} */ } */
if(Math.abs(path - (margin || 0)) < 1) {
cancelAnimationByKey(container);
return Promise.resolve();
}
if(axis === 'y') { if(axis === 'y') {
if(forceDirection === undefined) { if(forceDirection === undefined) {
if(path > maxDistance) { if(path > maxDistance) {

Loading…
Cancel
Save