extensions/amp-story/1.0/amp-story-system-layer.js
/**
   * Reacts to the active page index changing.
   * @param {number} index
   */
Reacts to the active page index changing.
@param {number} index
Reacts to the active page index changing . @param { number } index
onPageIndexUpdate_(index) {
    this.vsync_.mutate(() => {
      const lastIndex =
        this.storeService_.get(StateProperty.PAGE_IDS).length - 1;
      this.getShadowRoot().classList.toggle(
        'i-amphtml-first-page-active',
        index === 0
      );
      this.getShadowRoot().classList.toggle(
        'i-amphtml-last-page-active',
        index === lastIndex
      );
    });
  }
onPageIndexUpdate_ ( index ) { this . vsync_ . mutate ( ( ) => { const lastIndex = this . storeService_ . get ( StateProperty . PAGE_IDS ) . length - 1 ; this . getShadowRoot ( ) . classList . toggle ( 'i-amphtml-first-page-active' , index === 0 ) ; this . getShadowRoot ( ) . classList . toggle ( 'i-amphtml-last-page-active' , index === lastIndex ) ; } ) ; }
Reacts to the active page index changing.
Reacts to the active page index changing .