Skip to content

Commit 88e10ef

Browse files
committed
adjust script & package.json
1 parent c634ca3 commit 88e10ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-scroll-effect-module",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "Add effect at scroll.",
55
"keywords": [
66
"scroll",

src/js-scroll-effect-module.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export default class SCROLL_EFFECT_MODULE {
130130
el: el,
131131
index: i,
132132
pos: el.getBoundingClientRect().top + this.state.NumScrolltop,
133+
height: el.clientHeight,
134+
height2: el.offsetHeight,
133135
count: 0,
134136
active: false,
135137
intersect: false,
@@ -178,6 +180,7 @@ export default class SCROLL_EFFECT_MODULE {
178180
// Store element state at PosList.
179181
this.state.PosList.map((el)=>{
180182

183+
// When displayRatio and displayRatioReverse are the SAME.
181184
if(this.config.displayRatio === this.config.displayRatioReverse){
182185
if( this.state.NumScrolltop + ( this.NumWindowHeight * this.config.displayRatio ) > el.pos ){
183186
// First count up.
@@ -196,6 +199,7 @@ export default class SCROLL_EFFECT_MODULE {
196199
}
197200
}
198201

202+
// When displayRatio and displayRatioReverse are the DIFFERENT.
199203
if(this.config.displayRatio !== this.config.displayRatioReverse){
200204
if( this.state.NumScrolltop + ( this.NumWindowHeight * this.config.displayRatio ) > el.pos ){
201205
// First count up.

0 commit comments

Comments
 (0)