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

Insert

methods

Inserts an element at the specified position.

Parameters:positionNumber

The position to insert the element at. Existing children beyond this position will be shifted right.

elementkendo.drawing.Element

The element to insert.

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var group = new draw.Group();

    var pathA = new draw.Path().moveTo(0, 0).lineTo(100, 100);
    var pathB = new draw.Path().moveTo(0, 100).lineTo(100, 0);
    group.append(pathA, pathB);

    var circle = new draw.Circle(new kendo.geometry.Circle([50, 50], 25));
    group.insert(1, circle);

    console.log("Children count after insert:", group.children.length);
    console.log("Element at position 1:", group.children[1]);

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