We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diagram.clear() is not cleaning layers and throwing an exception

Thread ID:

Created:

Updated:

Platform:

Replies:

149086 Nov 13,2019 11:26 PM UTC Nov 14,2019 04:18 PM UTC React - EJ 2 1
loading
Tags: Diagram
raphael chancey
Asked On November 13, 2019 11:26 PM UTC

I am trying to clear a diagram and then redraw it.. when I run use diagramInstance.clear.. it throws an exception when I add the first node.. and I think it is because the node still exists in the layers.

I have a node with id ='start'

I have it in a layer.. I clear the diagram. I try to add the start node back.. and get this:
the goal is to clear the diagram and the layers to start fresh.. 

is there a preferred method to really clear the diagram at runtime .. or is there a big in clear that it is not learning the layers?

can I reset the layers?

Unhandled Rejection (TypeError): null is not an object (evaluating 'diagramDiv.parentNode')



Shyam G [Syncfusion]
Replied On November 14, 2019 04:18 PM UTC

Hi Raphael, 
 
We have checked by clearing the diagram using diagram clear method. We could not able to replicate an issue at our end. Could you please share us more details such as modify the below sample. 
 
 
Regards, 
Shyam G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon