Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Reset canvas on button click

$
0
0

@akash1 wrote:

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.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles