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
close icon

Add Event to Double Clicking on Node

Hi,

Is it possible to add a double click event on nodes that were added to a diagram? And also, if at all possible, trigger events when nodes/connectors are updated? (Connector connects to different node, triggers event to save)

3 Replies

SG Shyam G Syncfusion Team September 22, 2014 01:04 PM UTC

Hi Chong

Thanks for using Syncfusion products.

We have listed out events in the below table which meets your requirement.

 

Query

Response

Is it possible to add a double click event on nodes that were added to a diagram? And also, if at all possible, trigger events when nodes/connectors are updated? (Connector connects to different node, triggers event to save).

1.Drag event

 

This event fires when we drag the node. you can perform save operation in this event.

 

Code snippet:

Diagram1.Model.Drag = "Dragging";

function Dragging() {

        

       }

 

2.ConnectionChange event

 

This event fires when we connect connector to node.

 

Code snippet:

Diagram1.Model.ConnectionChange = "connectionchange";

 

function connectionchange() {

       

      }

 

3.TextChange event

 

This event fires after performing end edit the label.

 

Code snippet:

Diagram1.Model.TextChange = "Textchanging";

function Textchanging(evt) {

        

     }

 

4. NodeCollectionChange event

 

This event fires when we drop the node from palette.

 

Code snippet:

Diagram1.Model.NodeCollectionChange = "nodeCollectionChange";

 

function nodeCollectionChange() {

    

     }

 

 

We have attached sample below for your reference.

Please get back to us if any concerns.

Regards,

Shyam G


Attachment: TestDiagramViewer_(2)_e04ecd85.zip


CY Chong Yee Mei September 23, 2014 03:23 AM UTC

Hi Shyam,

Thanks for the info, but what we are trying to achieve is to have the diagram display a series of events, and clicking(or double clicking) on a  node actually opens up a dialog box to edit that event from the whole list, so that whenever a change is made, the event is triggered back to the server to save to db. Currently, from the way we see it, diagram events are mostly client side events. Any way for us to achieve what we are trying to do?


SG Shyam G Syncfusion Team September 25, 2014 03:28 AM UTC

Hi Chong

Thanks for the update.

Currently we don’t have support for click and double click events in the server side. We consider this as a feature request and created a new incident 130057 on behalf of you related to this forum. We suggest you to follow up the incident for further reference using your direct trac account.

Please let us know if you have any concerns.

Regards,

Shyam G


Loader.
Live Chat Icon For mobile
Up arrow icon