Skip to content

Commit 41e3178

Browse files
committed
add "onScrollEnd" method.
1 parent 82f0c67 commit 41e3178

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/js-scroll-module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js-scroll-module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export class SCROLL_MODULE {
1313
if(window.innerWidth <= 765){
1414
return true;
1515
}
16-
}
16+
},
17+
onScrollEnd: ()=>{}
1718
};
1819

1920
this.options = Object.assign(_options_default, options);
@@ -136,6 +137,7 @@ export class SCROLL_MODULE {
136137

137138
if(duration <= this.state.numCountDuration){
138139
window.cancelAnimationFrame(this.instance);
140+
this.options.onScrollEnd();
139141
}
140142
};
141143
loop();

0 commit comments

Comments
 (0)