|
Hi. \nI was exploring the jgraphX API and I override the "connection" handler to increment a variable that stores the number of edges in the graph. \nHere is the code: \n\nThe problem is:\nWhenever I double click the cell(vertex) the variable is incremented because a "self loop" (connection (v1,v1)) is created. \nI wonder if there is a way to not allow these "self loops". \nSorry if this is an issue already discussed. I did some research and found no solution.\nAnd sorry for my english. I'm getting better. |
|
Me too had the same problem, since cant find an apt solution, i used a condition check. Hope this helps. \n\n} You tried setAllowLoops and it didn't work?
(01 Feb, 02:35)
David ♦♦
1
No David,\nstill the CONNECT event gets triggered when i try to rename by clicking.
(01 Feb, 02:41)
Saju Chithran
|
|
Thanks, this event will no longer be fired in the next version. We'll add an active flag in mxConnectionHandler to avoid this. |
|
It's working very well. \nIs there a way to effectively don't allow these self loops?\nI'm using this: \n\nAnd it's working. But I don't really know what's happening. \nThanks for the help and sorry for my English. I'm getting better. |
|
mxGraph.setAllowLoops(false) should disable such loops, but there seems to be a bug that still allows them. What are the exact steps to create such a look, just double click? |
|
Using this code: \n\nwith:\n graph.setAllowLoops(false); \nor (doesn't matter) \n\nthe CONNECT event is gets triggered when I try to rename by clicking.\nIf the double click is in the "border" area, the event isn't triggered (and you can rename without add a new edge). Only happens when you click (to rename) in the middle of the cell and that "connect behavior" (responsible to take the edge to another cell) is triggered. |
|
Ok, ty. \nOne last question: \nIs there any way to know how many edges are removed when you remove a vertex?\nI am building an application that needs to get some information from the graph dynamically. And I'm having problems with it. \nAgain: TY, and sorry for my English. Problem solved. Ty guys.
(01 Feb, 12:08)
sverker
|