Skip to content

Commit ad18f57

Browse files
authored
Merge pull request #6 from yama-dev/v0.5.0
V0.5.0
2 parents c4efb05 + ab6e4db commit ad18f57

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It's a scroll utility.
1616

1717
## Installation,Download
1818

19-
- Standalone(CDN) -> [https://cdn.jsdelivr.net/gh/yama-dev/js-scroll-module@v0.3.1/dist/js-scroll-module.js](https://cdn.jsdelivr.net/gh/yama-dev/js-scroll-module@v0.3.1/dist/js-scroll-module.js)
19+
- Standalone(CDN) -> [https://cdn.jsdelivr.net/gh/yama-dev/js-scroll-module@v0.5.0/dist/js-scroll-module.js](https://cdn.jsdelivr.net/gh/yama-dev/js-scroll-module@v0.5.0/dist/js-scroll-module.js)
2020

2121
<br>
2222

dist/js-scroll-module.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
if(window.innerWidth <= 765){
6464
return true;
6565
}
66+
},
67+
onScrollEnd: function(){
68+
console.log('onScrollEnd');
6669
}
6770
});
6871
</script>
@@ -74,6 +77,9 @@
7477
if(window.innerWidth <= 765){
7578
return true;
7679
}
80+
},
81+
onScrollEnd: function(){
82+
console.log('onScrollEnd');
7783
}
7884
});
7985
</script>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@yama-dev/js-scroll-module",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "",
55
"keywords": [
66
"module",

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)