Hi,
I want to reset (i.e. remove every thing that is on canvas )my canvas on click of a button
Here is my code :
document.getElementById("reset-canvas").onclick=function(event){
event.preventDefault();
nodeDataArray=[];
linkDataArray=[];
}
But it doesn’t remove the shapes that are drawn on the canvas.How can i do this?
Thanks in advance.