File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed
Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -333,24 +333,6 @@ <h2 class="color-1 weight-title-h font-title section__title center">A codeful of
333333
334334 } ) ;
335335
336- /*
337- // window scroll position
338- const scrolled = window.scrollY || window.pageYOffset;
339-
340- // add staggered feature points animation
341- featurePoints.forEach((point, index) => {
342-
343- const pointAnimation = startPointAnimation + (pointStaggerInterval * index);
344-
345- if (scrolled >= pointAnimation) {
346- point.classList.add('visible');
347- } else {
348- point.classList.remove('visible');
349- }
350-
351- });
352- */
353-
354336}
355337
356338function isScrolledIntoView ( el ) {
@@ -360,10 +342,10 @@ <h2 class="color-1 weight-title-h font-title section__title center">A codeful of
360342 const elemBottom = rect . bottom ;
361343
362344 // Only completely visible elements return true:
363- const isVisible = ( elemTop >= 0 ) && ( elemBottom <= window . innerHeight ) ;
345+ // const isVisible = (elemTop >= 0) && (elemBottom <= window.innerHeight);
364346
365347 // Partially visible elements return true:
366- // isVisible = elemTop < window.innerHeight && elemBottom >= 0;
348+ let isVisible = elemTop < window . innerHeight && elemBottom >= 0 ;
367349
368350 return isVisible ;
369351
You can’t perform that action at this time.
0 commit comments