code: function mxPopupMenuHandler(graph, factoryMethod)
  {
  	if (graph != null)
  	{
  		this.graph = graph;
  		this.factoryMethod = factoryMethod;
  		this.graph.addMouseListener(this);
  		
  		// Does not show menu if any touch gestures take place after the trigger
  		this.gestureHandler = mxUtils.bind(this, function(sender, eo)
  		{
  			this.inTolerance = false;
  		});
  		
  		this.graph.addListener(mxEvent.GESTURE, this.gestureHandler);
  		
  		this.init();
  	}
  }
docs: Copyright (c) 2006-2015, JGraph Ltd
  Copyright (c) 2006-2015, Gaudenz Alder
   
  Class: mxPopupMenuHandler
  
  Event handler that creates popupmenus.
  
  Constructor: mxPopupMenuHandler
  
  Constructs an event handler that creates a <mxPopupMenu>.