docs: function mxPanningHandler(graph)
  {
  	if (graph != null)
  	{
  		this.graph = graph;
  		this.graph.addMouseListener(this);
  
  		// Handles force panning event
  		this.forcePanningHandler = mxUtils.bind(this, function(sender, evt)
  		{
  			var evtName = evt.getProperty('eventName');
  			var me = evt.getProperty('event');
  			
  			if (evtName == mxEvent.MOUSE_DOWN && this.isForcePanningEvent(me))
  			{
  				this.start(me);
  				this.active = true;
  				this.fireEvent(new mxEventObject(mxEvent.PAN_START, 'event', me));
  				me.consume();
  			}
  		});
  
  		this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT, this.forcePanningHandler);
  		
  		// Handles pinch gestures
  		this.gestureHandler = mxUtils.bind(this, function(sender, eo)
  		{
  			if (this.isPinchEnabled())
  			{
  				var evt = eo.getProperty('event');
  				
  				if (!mxEvent.isConsumed(evt) && evt.type == 'gesturestart')
  				{
  					this.initialScale = this.graph.view.scale;
  				
  					// Forces start of panning when pinch gesture starts
  					if (!this.active && this.mouseDownEvent != null)
  					{
  						this.start(this.mouseDownEvent);
  						this.mouseDownEvent = null;
  					}
  				}
  				else if (evt.type == 'gestureend' && this.initialScale != null)
  				{
  					this.initialScale = null;
  				}
  				
  				if (this.initialScale != null)
  				{
  					var value = Math.round(this.initialScale * evt.scale * 100) / 100;
  					
  					if (this.minScale != null)
  					{
  						value = Math.max(this.minScale, value);
  					}
  					
  					if (this.maxScale != null)
  					{
  						value = Math.min(this.maxScale, value);
  					}
  	
  					if (this.graph.view.scale != value)
  					{
  						this.graph.zoomTo(value);
  						mxEvent.consume(evt);
  					}
  				}
  			}
  		});
  		
  		this.graph.addListener(mxEvent.GESTURE, this.gestureHandler);
  		
  		this.mouseUpListener = mxUtils.bind(this, function()
  		{
  		    	if (this.active)
  		    	{
  		    		this.reset();
  		    	}
  		});
  		
  		// Stops scrolling on every mouseup anywhere in the document
  		mxEvent.addListener(document, 'mouseup', this.mouseUpListener);
  	}
  }