function _handleSuspendTraversal( node ) {
    var menu = node.data;
    menu.clearTransitions();

    // 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();
    }
  }
/**
   * Iterate over the sub menus and handle setting the suspended state.
   * @param {TreeNode} node - The data source for the current menu.
   */
Iterate over the sub menus and handle setting the suspended state.
@param {TreeNode} node - The data source for the current menu.
Iterate over the sub menus and handle setting the suspended state . @param { TreeNode } node - The data source for the current menu .
function _handleSuspendTraversal( node ) {
    var menu = node.data;
    menu.clearTransitions();
    if ( menu.isExpanded() ) {
      menu.collapse();
    }
  }
function _handleSuspendTraversal ( node ) { var menu = node . data ; menu . clearTransitions ( ) ; if ( menu . isExpanded ( ) ) { menu . collapse ( ) ; } }
Iterate over the sub menus and handle setting the suspended state.
Iterate over the sub menus and handle setting the suspended state .
// 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.