function _handleResumeTraversal( node ) {
    var nLevel = node.level;
    var menu = node.data;

    if ( nLevel === 1 ) {
      var wrapperSel = '.o-mega-menu_content-2-wrapper';
      var contentDom = menu.getDom().content;
      var wrapperDom = contentDom.querySelector( wrapperSel );
      var transition = menu.getTransition();

      // This ensures the transition has been removed by MegaMenuMobile.
      transition = _setTransitionElement( wrapperDom, transition );
      transition.moveUp();

      // TODO: The only reason hiding is necessary is that the
      //       drop-shadow of the menu extends below its border,
      //       so it's still visible when the menu slides -100% out of view.
      //       Investigate whether it would be better to have a u-move-up-1_1x
      //       or similar class to move up -110%. Or whether the drop-shadow
      //       could be included within the bounds of the menu.
      menu.getDom().content.classList.add( 'u-invisible' );
      menu.setExpandTransition( transition, transition.moveToOrigin );
      menu.setCollapseTransition( transition, transition.moveUp );

      // TODO: Investigate whether deferred collapse has another solution.
      //       This check is necessary since a call to an already collapsed
      //       menu will set a deferred collapse that will be called
      //       on expandEnd next time the flyout is expanded.
      //       The deferred collapse is used in cases where the
      //       user clicks the flyout menu while it is animating open,
      //       so that it appears like they can collapse it, even when
      //       clicking during the expand animation.
      if ( menu.isExpanded() ) {
        menu.collapse();
      }
    } else if ( nLevel === 2 ) {
      menu.suspend();
    }
  }
/**
   * Iterate over the sub menus and handle setting the resumed state.
   * @param {TreeNode} node - The data source for the current menu.
   */
Iterate over the sub menus and handle setting the resumed state.
@param {TreeNode} node - The data source for the current menu.
Iterate over the sub menus and handle setting the resumed state . @param { TreeNode } node - The data source for the current menu .
function _handleResumeTraversal( node ) {
    var nLevel = node.level;
    var menu = node.data;
    if ( nLevel === 1 ) {
      var wrapperSel = '.o-mega-menu_content-2-wrapper';
      var contentDom = menu.getDom().content;
      var wrapperDom = contentDom.querySelector( wrapperSel );
      var transition = menu.getTransition();
      transition = _setTransitionElement( wrapperDom, transition );
      transition.moveUp();
      menu.getDom().content.classList.add( 'u-invisible' );
      menu.setExpandTransition( transition, transition.moveToOrigin );
      menu.setCollapseTransition( transition, transition.moveUp );
      if ( menu.isExpanded() ) {
        menu.collapse();
      }
    } else if ( nLevel === 2 ) {
      menu.suspend();
    }
  }
function _handleResumeTraversal ( node ) { var nLevel = node . level ; var menu = node . data ; if ( nLevel === 1 ) { var wrapperSel = '.o-mega-menu_content-2-wrapper' ; var contentDom = menu . getDom ( ) . content ; var wrapperDom = contentDom . querySelector ( wrapperSel ) ; var transition = menu . getTransition ( ) ; transition = _setTransitionElement ( wrapperDom , transition ) ; transition . moveUp ( ) ; menu . getDom ( ) . content . classList . add ( 'u-invisible' ) ; menu . setExpandTransition ( transition , transition . moveToOrigin ) ; menu . setCollapseTransition ( transition , transition . moveUp ) ; if ( menu . isExpanded ( ) ) { menu . collapse ( ) ; } } else if ( nLevel === 2 ) { menu . suspend ( ) ; } }
Iterate over the sub menus and handle setting the resumed state.
Iterate over the sub menus and handle setting the resumed state .
// This ensures the transition has been removed by MegaMenuMobile. // TODO: The only reason hiding is necessary is that the //       drop-shadow of the menu extends below its border, //       so it's still visible when the menu slides -100% out of view. //       Investigate whether it would be better to have a u-move-up-1_1x //       or similar class to move up -110%. Or whether the drop-shadow //       could be included within the bounds of the menu. // TODO: Investigate whether deferred collapse has another solution. //       This check is necessary since a call to an already collapsed //       menu will set a deferred collapse that will be called //       on expandEnd next time the flyout is expanded. //       The deferred collapse is used in cases where the //       user clicks the flyout menu while it is animating open, //       so that it appears like they can collapse it, even when //       clicking during the expand animation.