pan

Pans the diagram with a specified delta (represented as a Point).

Parameters

pan Object|kendo.dataviz.diagram.Point

The translation delta to apply to the diagram or the Point to pan to.

Example - pan to a predefined point in the Diagram

<button id="panBtn">Pan Diagram</button>
<div id="diagram"></div>
<script>
  $("#panBtn").on("click", function(){
    var diagram = $("#diagram").getKendoDiagram();
    var point = new kendo.dataviz.diagram.Point(120, 120);
    diagram.pan(point);
  });
  $("#diagram").kendoDiagram({
    zoom: 1.5,
    shapes: [{
      id: "1",
      x: 100,
      y: 20
    }, {
      id: "2",
      x: 350,
      y: 20
    }, {
      id: "3",
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>
In this article
Not finding the help you need? Improve this article