Edit this page

undo

Undoes the previous action.

Example - undoing items removal

<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, fill: "red"}));
  var shape2 = diagram.addShape(new Shape({x:400, y:100, fill: "red"}));
  var con = diagram.connect(shape1,shape2);
  diagram.remove([shape1, shape2, con]);
  diagram.undo()
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy