src/init.js
function updateStepAboveIO() {
    io.stepAbove = stepEl.map((el, i) => {
      const marginTop = -offsetMargin + stepOffsetHeight[i];
      const marginBottom = offsetMargin - viewH;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const options = { rootMargin };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepAbove, options);
      obs.observe(el);
      return obs;
    });
  }
function updateStepAboveIO() {
    io.stepAbove = stepEl.map((el, i) => {
      const marginTop = -offsetMargin + stepOffsetHeight[i];
      const marginBottom = offsetMargin - viewH;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const options = { rootMargin };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepAbove, options);
      obs.observe(el);
      return obs;
    });
  }
function updateStepAboveIO ( ) { io . stepAbove = stepEl . map ( ( el , i ) => { const marginTop = - offsetMargin + stepOffsetHeight [ i ] ; const marginBottom = offsetMargin - viewH ; const rootMargin = ` ${ marginTop } ${ marginBottom } ` ; const options = { rootMargin } ; // console.log(options); const obs = new IntersectionObserver ( intersectStepAbove , options ) ; obs . observe ( el ) ; return obs ; } ) ; }
look above for intersection
look above for intersection