sourcePoint

Gets the global coordinate of the connection's start (initial endpoint). The method returns a Point independently of the object to which the source is attached.

Returns

kendo.dataviz.diagram.Point the coordinates of the connection source.

Example - configuring the sourcePoint

<button id="getSourceBtn">Get Connection Source Point</button>
<div id="diagram"></div>
<script>
  var Shape = kendo.dataviz.diagram.Shape;
  $("#diagram").kendoDiagram();
  var diagram = $("#diagram").data("kendoDiagram");
  var shape1 = diagram.addShape( new Shape({ x: 100, y: 100 }));
  var shape2 = diagram.addShape( new Shape({ x: 300, y: 180 }));

  var connection = new kendo.dataviz.diagram.Connection(shape1, shape2, {
    fromConnector: "left",
    type: "cascading",
    selectable: false
  });

  diagram.addConnection(connection);

  $("#getSourceBtn").on("click", function(){
    var connection = diagram.connections[0];
    var point = connection.sourcePoint();
    console.log("Connection source point: x = " + point.x + "; y = " + point.y);
  });
</script>
In this article
Not finding the help you need? Improve this article