extensions/amp-list/0.1/amp-list.js
/**
   * Undoes previous size-defined layout, must be called in mutation context.
   * @param {string} previousLayout
   */
Undoes previous size-defined layout, must be called in mutation context.
@param {string} previousLayout
Undoes previous size - defined layout must be called in mutation context . @param { string } previousLayout
undoPreviousLayout_(previousLayout) {
    switch (previousLayout) {
      case Layout.RESPONSIVE:
        this.element.classList.remove('i-amphtml-layout-responsive');
        setStyles(this.element, {
          height: '',
          width: '',
        });
        break;
      case Layout.FLEX_ITEM:
        setStyles(this.element, {
          height: '',
          width: '',
        });
        break;
      case Layout.FIXED:
        this.element.classList.remove('i-amphtml-layout-fixed');
        setStyles(this.element, {
          height: '',
        });
        break;
      case Layout.FIXED_HEIGHT:
        this.element.classList.remove('i-amphtml-layout-fixed-height');
        setStyles(this.element, {
          height: '',
          width: '',
        });
        break;
      case Layout.INTRINSIC:
        this.element.classList.remove('i-amphtml-layout-intrinsic');
        break;
    }
    this.element.changeSize();
    this.element.classList.remove('i-amphtml-layout-size-defined');
  }
undoPreviousLayout_ ( previousLayout ) { switch ( previousLayout ) { case Layout . RESPONSIVE : this . element . classList . remove ( 'i-amphtml-layout-responsive' ) ; setStyles ( this . element , { height : '' , width : '' , } ) ; break ; case Layout . FLEX_ITEM : setStyles ( this . element , { height : '' , width : '' , } ) ; break ; case Layout . FIXED : this . element . classList . remove ( 'i-amphtml-layout-fixed' ) ; setStyles ( this . element , { height : '' , } ) ; break ; case Layout . FIXED_HEIGHT : this . element . classList . remove ( 'i-amphtml-layout-fixed-height' ) ; setStyles ( this . element , { height : '' , width : '' , } ) ; break ; case Layout . INTRINSIC : this . element . classList . remove ( 'i-amphtml-layout-intrinsic' ) ; break ; } this . element . changeSize ( ) ; this . element . classList . remove ( 'i-amphtml-layout-size-defined' ) ; }
Undoes previous size-defined layout, must be called in mutation context.
Undoes previous size - defined layout must be called in mutation context .
// The changeSize() call removes the sizer element. /*OK*/