Given the javascript Hello World example (mxgraph/javascript/examples/helloworld.html
):
If you click and drag the edge, it will move so that it is not connected to the vertices anymore. I want to modify helloworld.html
, so that the edge cannot be decoupled from the vertices. How can I achieve this?
Asked
Active
Viewed 1,032 times
3

matthiash
- 3,105
- 3
- 23
- 34
1 Answers
5
Place the following code before the try-finally block:
graph.setAllowDanglingEdges(false);
graph.setDisconnectOnMove(false);
This is explained in the documentation.

matthiash
- 3,105
- 3
- 23
- 34