- Home
- Forum
- JavaScript - EJ 2
- ConnectionChange Event
ConnectionChange Event
Hi, we have an issue where the connectionChange event seems to be firing many, many times.


In the below screenshot, we have moved the end point of the connector to the square.
We have hooked the connectionChange event with the following....
connectionChange: function (evtArgs) {
if (evtArgs.state === "Changing"){
if (evtArgs.connector != null) { // && evtArgs.newValue.connectorTargetValue!=null) {
//if (oldValue != null && oldValue.nodeId === "") {
//}
console.log(evtArgs.connector.sourceID + " - " + evtArgs.connector.targetID);
}
}
}
This results in the following....
My issues are:
- Why are the events being fired many, many times (we have about 20 times). This is the same for the 'Changed' state too.
- Why do half of these events have a sourceID defined whilst the other half do not.
Many Thanks
SIGN IN To post a reply.
4 Replies
SK
Suganthi Karuppannan
Syncfusion Team
March 2, 2020 09:04 AM UTC
Hi James Hutchison,
We are able to reproduce the reported issue at our end. We are validating your issue and update you with more details on 4th march 2020.
Regards,
Suganthi K.
SG
Shyam G
Syncfusion Team
March 5, 2020 12:53 PM UTC
Hi James,
Sorry for the inconvenience.
|
Query |
Response |
|
The connectionChange event gets triggered only once at the changed state. Please refer to a sample and the video below for your reference. In the changing state, the event will be triggered many times and it is a behavior of our control.
Video: https://www.syncfusion.com/downloads/support/directtrac/general/7z/connectionChangeEvent246417920
|
|
We don’t have sourceID property in the event arguments except in the connector object. Could you please share us more details such as where do you find this property in the event and share us a screenshot. |
Regards,
Shyam G
JH
James Hutchison
March 5, 2020 01:45 PM UTC
Suganthi, thanks for the reply.
Attachment: diag_86faa0b7.zip
In your original response you said you were able to reproduce the issue?
Attached is a sample application which, if you change one of the connections you will be able to see the issue. Perhaps the issue is to do with SVG images?
Thanks
Attachment: diag_86faa0b7.zip
SG
Shyam G
Syncfusion Team
March 6, 2020 09:43 AM UTC
Hi James.
By analyzing your sample, we found that you are using the older version of ej2.min.js file, so only the connection change event’s changed state has called multiple times. We have fixed it in our latest version. We have modified your sample with the latest ej2.min.js file and provided the sample link below.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/7z/connectionChangeSample1516013190
Regards,
Shyam G
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
JH James Hutchison
- Feb 29, 2020 12:56 PM UTC
- Mar 6, 2020 09:43 AM UTC