rytm-webflow 2.1.8 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/aswap/WebflowView.js +14 -9
package/package.json
CHANGED
|
@@ -217,16 +217,21 @@ class WebflowView extends View {
|
|
|
217
217
|
});
|
|
218
218
|
// on scene add event
|
|
219
219
|
scene.on("add", (e) => {
|
|
220
|
-
if
|
|
220
|
+
// wait 10ms before checking if element is in view
|
|
221
|
+
// due to asap scroll position reset
|
|
222
|
+
setTimeout(() => {
|
|
221
223
|
// element is in view - animate IN
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
if (elementIsVisibleInViewport(el, true)) {
|
|
225
|
+
console.log("Timeout", el);
|
|
226
|
+
gsap.to(el, {
|
|
227
|
+
duration: propsShow.time,
|
|
228
|
+
...propsShow.tween,
|
|
229
|
+
onComplete: () => {
|
|
230
|
+
el.classList.add(CLASS_NAME_WEBSCROLL_FIRED);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}, 10);
|
|
230
235
|
});
|
|
231
236
|
scene.addTo(scrollController.get());
|
|
232
237
|
this.scenes.push(scene);
|