Query |
Response | |
Dragging an dropping items from a symbol palette into the diagram does not add a new item to my list but the new item gets displayed in the diagram. I can see the diagram nodes in the nodes list of the diagram instance. |
When we add a new node in the diagram dynamically, then that node will be automatically added in the nodes collection. Also, the collectionChange event gets triggered whenever you add new node/connector in the diagram. In this event, you will get a newly added object in the arguments element property and you can customize the new node in this event. Please refer to a help documentation, code example and the sample below.
Code example:
| |
Add shape, add a connector, link connector to shape, add shape causes the first connector to disappear
- Add shape, add a connector, link connector to shape, add shape causes the first connector to disappear, then if I add a new connector, the old connector reappears (still linked to the shape)
|
The reported issue happens only when you set a same id for each node and the connector. An diagram element id should be unique. Please refer to a code example below in which we have set a unique id for nodes and connectors at button click.
Code example:
|