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. Image for the cookie policy date

Best practice - OnClientNodeCollectionChange vs OnClientDrop ?

Hi,

I have been using the drop handler for just that purpose - when the user drops a node on the canvas from a palette.  My current intention is to use the nodeCollectionChange handler to deal with additions caused by programmatic actions or user actions such as Copy/Paste.

Is there any suggested usage for when to use the nodeCollectionChange event?  Should I even bother with my drop handler? 

Any advice would be appreciated.

Thanks

Jim

1 Reply

SK Senthil Kumar M Syncfusion Team May 7, 2015 11:22 AM UTC

Hi Jim,

Thanks for using Syncfusion products.

We have provided the difference between nodeCollectionChange event and the drop event in the below tabular column.

nodeCollectionChange

drop

Please note that nodeCollectionChange event will be triggered when you adding any new shapes onto the diagram at runtime. The nodeCollectionChange event will be triggered in the following scenarios.

1. Clipboard commands (Cut, Copy, Paste)

2. client side API methods “add” or “delete”.

3. Drag and Drop symbols from palette to canvas. (Please note that nodeCollectionChange event will be triggered once the shape entered into the canvas from palette).

You can use this event based on your requirement.

Drop event triggers when you dropped the symbols from palette to canvas.

Please refer the online class API reference link below

Link:http://help.syncfusion.com/UG/JS_CR/ejDiagram.html#event:nodeCollectionChange

Please refer the online class API reference link below

Link:http://help.syncfusion.com/UG/JS_CR/ejDiagram.html#event:drop

Please let us know if any concerns.

Regards,

Senthilkumar M


Loader.
Live Chat Icon For mobile
Up arrow icon