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.
Syncfusion Feedback

Cannot remove nodes because of InEdges with name "helper"

Thread ID:

Created:

Updated:

Platform:

Replies:

123197 Feb 25,2016 10:10 AM UTC Feb 26,2016 11:19 AM UTC JavaScript 1
loading
Tags: ejDiagram
Tycho
Asked On February 25, 2016 10:10 AM UTC

Hello,

We do have problems with removing nodes on the ejDiagram.
This happens when a user first tried to draw new edges to a node but the connecting is prevented in the "connectionChange"-event (by args.cancel = true, e.g. to avoid connecting to a specific port).
This causes the generation of many "InEdges" with the name "helper" that are not cleaned-up.
Those helper-edges generate an error when the node is removed.

How could this be avoided and still use the possibility to cancel specific connectors being connected on the "connectionChange"-event?
An example to reproduce the error is given here: http://jsplayground.syncfusion.com/fvcffhbc

Best regards,
Tycho


ejDiagram version: 13.4.0.53

Shyam G [Syncfusion]
Replied On February 26, 2016 11:19 AM UTC

Hi Tycho,

Please use connectorSourceChange and connectorTargetChange event to achieve your requirement. please refer to the code example below.

$("#diagram").ejDiagram({

      //define connectorTargetChange event

        connectorTargetChange: connectionchange,

         //define connectorSourceChange event

        connectorSourceChange: connectionchange,

   });


       function connectionchange(args) {

                    if (args.node || args.port)

                        args.cancel = true;
    }

JSPlayground link:http://jsplayground.syncfusion.com/2jxuchme

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.

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

;