function _handleTriggerClick( event ) {
      this.dispatchEvent( 'triggerClick', { target: this } );
      var menu = event.target;
      if ( !menu.isAnimating() ) {
        if ( _activeMenu === null ) {
          // A menu is opened.
          _activeMenu = menu;
          _activeMenu.getTransition().animateOn();
          // TODO: Investigate whether mouseout event may be able to be used
          //       instead of mousemove.
          _bodyDom.addEventListener( 'mousemove', _handleMove );
          _bodyDom.addEventListener( 'mouseleave', _handleMove );
        } else if ( _activeMenu === menu ) {
          // A menu is closed.
          _activeMenu.getTransition().animateOn();
          _activeMenu = null;
          _bodyDom.removeEventListener( 'mousemove', _handleMove );
          _bodyDom.removeEventListener( 'mouseleave', _handleMove );
        } else {
          // An open menu has switched to another menu.
          _activeMenu.getTransition().animateOff();
          _activeMenu.collapse();
          _activeMenu = event.target;
          _activeMenu.getTransition().animateOff();
        }
      }
    }
/**
     * Event handler for when FlyoutMenu trigger is clicked.
     * @param {Event} event - A FlyoutMenu event.
     */
Event handler for when FlyoutMenu trigger is clicked.
@param {Event} event - A FlyoutMenu event.
Event handler for when FlyoutMenu trigger is clicked . @param { Event } event - A FlyoutMenu event .
function _handleTriggerClick( event ) {
      this.dispatchEvent( 'triggerClick', { target: this } );
      var menu = event.target;
      if ( !menu.isAnimating() ) {
        if ( _activeMenu === null ) {
          _activeMenu = menu;
          _activeMenu.getTransition().animateOn();
          _bodyDom.addEventListener( 'mousemove', _handleMove );
          _bodyDom.addEventListener( 'mouseleave', _handleMove );
        } else if ( _activeMenu === menu ) {
          _activeMenu.getTransition().animateOn();
          _activeMenu = null;
          _bodyDom.removeEventListener( 'mousemove', _handleMove );
          _bodyDom.removeEventListener( 'mouseleave', _handleMove );
        } else {
          _activeMenu.getTransition().animateOff();
          _activeMenu.collapse();
          _activeMenu = event.target;
          _activeMenu.getTransition().animateOff();
        }
      }
    }
function _handleTriggerClick ( event ) { this . dispatchEvent ( 'triggerClick' , { target : this } ) ; var menu = event . target ; if ( ! menu . isAnimating ( ) ) { if ( _activeMenu === null ) { _activeMenu = menu ; _activeMenu . getTransition ( ) . animateOn ( ) ; _bodyDom . addEventListener ( 'mousemove' , _handleMove ) ; _bodyDom . addEventListener ( 'mouseleave' , _handleMove ) ; } else if ( _activeMenu === menu ) { _activeMenu . getTransition ( ) . animateOn ( ) ; _activeMenu = null ; _bodyDom . removeEventListener ( 'mousemove' , _handleMove ) ; _bodyDom . removeEventListener ( 'mouseleave' , _handleMove ) ; } else { _activeMenu . getTransition ( ) . animateOff ( ) ; _activeMenu . collapse ( ) ; _activeMenu = event . target ; _activeMenu . getTransition ( ) . animateOff ( ) ; } } }
Event handler for when FlyoutMenu trigger is clicked.
Event handler for when FlyoutMenu trigger is clicked .
// A menu is opened. // TODO: Investigate whether mouseout event may be able to be used //       instead of mousemove. // A menu is closed. // An open menu has switched to another menu.