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.
Unfortunately, activation email could not send to your email. Please try again.

Getting an error when trying to delete nodes from diagram when added through tool

Thread ID:

Created:

Updated:

Platform:

Replies:

131131 Jun 22,2017 10:33 AM Jul 6,2017 02:19 AM Angular 5
loading
Tags: ejDiagram
Robert Williamson
Asked On June 22, 2017 10:33 AM

Hi guys
I'm using the line tool to create a node if there is no target node. What i've noticed is that when we use this to add a node if we try to delete the node from the diagram we get an error to say "Cannot read property 'segments' of undefined"
Please find an example in the zip at the following URL

https://1drv.ms/u/s!AgxIdbDPqmRThVeWqWwGJKBi5OfD

Thanks
Robert

Shyam G [Syncfusion]
Replied On June 23, 2017 02:34 AM

Hi Robert, 
 
The reported issue is an sample level issue. Please remove the highlighted line from linktool mousup in your sample to resolve your issue. Please refer to the code example below. 
 
Code example: 
 
class LinkTool extends ej.datavisualization.Diagram.OrthogonalLineTool { 
mouseup(evt) { 
 . . .  
. . . . 
. . . . 
  // this.diagram._updateEdges(this); 
. . .  
. . .  
}; 
}; 
 
Regards, 
Shyam G 


Robert Williamson
Replied On June 23, 2017 03:50 AM

Hi Shyam


Thanks for this i'm able to delete the nodes now. Just out of curiosity what does the _updateEdges do? 


Thanks

Robert


Shyam G [Syncfusion]
Replied On June 23, 2017 08:14 AM

Hi Robert, 
 
The _updateEdges method is used to update the incoming/outgoing connections of the node. We have used this method internally in our source to update the connection. So it’s not necessary to call this method in the application level. 
 
Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On July 6, 2017 02:17 AM

Hi Robert, 

Could you please confirm us whether you need to establish the connection with the ports. If yes, render the ports for the node initially and when you click on the connector tools, the ports will be visible and then you can establish the connection with the ports. Please refer to the sample below for your reference. 


Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On July 6, 2017 02:19 AM

Hi Robert, 
Please ignore our previous update. 
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.

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.

;