We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72c59cf commit 998d2d7Copy full SHA for 998d2d7
src/js-scroll-effect-module.js
@@ -224,6 +224,12 @@ export default class SCROLL_EFFECT_MODULE {
224
for (let _i = 0; _i < this.state.PosList.length; _i++) {
225
const el = this.state.PosList[_i];
226
227
+ if(this.config.customVarNameRatio){
228
+ let _ratio = (this.state.NumScrolltop + this.state.NumWindowHeight - el.pos) / this.state.NumWindowHeight;
229
+ let _ratio2 = Math.floor(_ratio * 100) / 100;
230
+ el.el.style.setProperty('--scroll-ratio', _ratio2);
231
+ }
232
+
233
if (flgPageBottom) {
234
setActiveState(el, true);
235
} else if (this.config.displayRatio === this.config.displayRatioReverse) {
0 commit comments