src/init.js
function updateStepProgressIO() {
    io.stepProgress = stepEl.map((el, i) => {
      const marginTop = stepOffsetHeight[i] - offsetMargin;
      const marginBottom = -viewH + offsetMargin;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const threshold = createThreshold(stepOffsetHeight[i]);
      const options = { rootMargin, threshold };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepProgress, options);
      obs.observe(el);
      return obs;
    });
  }
function updateStepProgressIO() {
    io.stepProgress = stepEl.map((el, i) => {
      const marginTop = stepOffsetHeight[i] - offsetMargin;
      const marginBottom = -viewH + offsetMargin;
      const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`;
      const threshold = createThreshold(stepOffsetHeight[i]);
      const options = { rootMargin, threshold };
      // console.log(options);
      const obs = new IntersectionObserver(intersectStepProgress, options);
      obs.observe(el);
      return obs;
    });
  }
function updateStepProgressIO ( ) { io . stepProgress = stepEl . map ( ( el , i ) => { const marginTop = stepOffsetHeight [ i ] - offsetMargin ; const marginBottom = - viewH + offsetMargin ; const rootMargin = ` ${ marginTop } ${ marginBottom } ` ; const threshold = createThreshold ( stepOffsetHeight [ i ] ) ; const options = { rootMargin , threshold } ; // console.log(options); const obs = new IntersectionObserver ( intersectStepProgress , options ) ; obs . observe ( el ) ; return obs ; } ) ; }
progress progress tracker
progress progress tracker