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

Is there an equivalent to diagram.getNode for a connector?

Hi,

I have a requirement to access a connector based on its name.
I am able to do this for nodes, but I've tried getConnector without luck.

Here's a snippet of my code:

       if ($find(txtDetailObjectType).get_value() != '') { // All bound objects have an object type (stored as an addInfo property); connectors do not
           var object = diagram.getNode($find(txtDetailObjectName).get_value());
       } else { // Must be a connector
           object = diagram.getConnector($find(txtDetailObjectName).get_value()); // It seems that is no such method as getConnector ***
       }

How do I go about getting the connector?
Also, tell me where I'd find this documented.

Thanks

Jim

1 Reply

SG Shyam G Syncfusion Team July 29, 2015 12:22 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Query
Response
I have a requirement to access a connector based on its name.
I am able to do this for nodes, but I've tried getConnector without luck.

Here's a snippet of my code:

       if ($find(txtDetailObjectType).get_value() != '') { // All bound objects have an object type (stored as an addInfo property); connectors do not
           var object = diagram.getNode($find(txtDetailObjectName).get_value());
       } else { // Must be a connector
           object = diagram.getConnector($find(txtDetailObjectName).get_value()); // It seems that is no such method as getConnector ***
       }

How do I go about getting the connector?

Please note that you can use the getNode API method to get the nodes/connectors object.

Also, tell me where I'd find this documented.
We have been analyzing our documentation. We will include the missing API in the documentation. We will inform you once it has been refreshed in online.



Please let me know if any concerns.

Regards,
Shyam G

Loader.
Live Chat Icon For mobile
Up arrow icon