New to Kendo UI for jQueryStart a free 30-day trial

Anchor

methods

Gets or sets the segment anchor point.

The setter returns the current Segment to allow chaining.

Parameters:valuekendo.geometry.Point

The new anchor point.

Returns:kendo.geometry.Point

The current anchor point.

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    // Create a path with segments
    var path = new draw.Path()
        .moveTo(100, 100)
        .lineTo(200, 100)
        .lineTo(200, 200)
        .stroke("red", 2);

    // Get the anchor point of the second segment
    var currentAnchor = path.segments[1].anchor();
    console.log("Current anchor:", currentAnchor.x, currentAnchor.y);

    // Set a new anchor point for the second segment
    path.segments[1].anchor(new geom.Point(250, 150));
    console.log("New anchor:", path.segments[1].anchor().x, path.segments[1].anchor().y);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(path);
</script>
Not finding the help you need?
Contact Support