Fix unneeded scroll event

This commit is contained in:
Eduard Kuzmenko 2022-01-28 22:37:25 +04:00
parent 59d588a5e6
commit 77d48d764d

View File

@ -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) {