undo
Undoes the previous action.
Example - undo Diagram changes
<button id="undoBtn">Undo</button>
<button id="redoBtn">Redo</button>
<div id="diagram"></div>
<script>
$("#undoBtn").on("click", function(){
var diagram = $("#diagram").getKendoDiagram();
diagram.undo();
});
$("#redoBtn").on("click", function(){
var diagram = $("#diagram").getKendoDiagram();
diagram.redo();
});
$("#diagram").kendoDiagram({
shapes:[
{
id:"1",
content:{
text: "State 1"
},
x: 20,
y: 20
},
{
id:"2",
content: {
text: "State 2"
},
x: 160,
y: 20
}
],
connections:[
{
from: "1",
to: "2"
}
]
});
</script>