jgraph/mxgraph

Draggable graph using mxgraph

govinda18 opened this issue · 2 comments

I am new to mxgraph and want to create a behaviour to drag the entire graph. The behaviour is expected to be similar to this(from cytoscape):

enter image description here

Any way to achieve this in mxgraph?

@govinda18 mxGraph calls this feature panning, see https://jgraph.github.io/mxgraph/docs/js-api/files/view/mxGraph-js.html#mxGraph.setPanning and information about panning in this documentation

You can see it in action in https://jgraph.github.io/mxgraph/javascript/examples/autolayout.html (you can hold the left or right mouse button to use panning)