JavaFXSmartGraph icon indicating copy to clipboard operation
JavaFXSmartGraph copied to clipboard

Weird behevior with arrow when reattach current arrow

Open chuckdu21 opened this issue 3 years ago • 1 comments

Here is my code:

var e = this.viewGraph.getStylableEdge(edge);
var line = (SmartGraphEdgeLine) e;
var arrow = line.getAttachedArrow();
line.attachArrow(arrow);

When i attach the current arrow, the arrows are missed placed and they doesn't move correctly when i move the vertices.

I tried to do that because i reset the radius of vertices with this :

var v = this.viewGraph.getStylableVertex(vertex);
var node = ((SmartGraphVertexNode<?>) v);
node.setRadius(35);

But the arrows are hid by the vertices now...

I can't replace the arrows :/ How can i do that ?

chuckdu21 avatar Sep 19 '22 11:09 chuckdu21

I don't understand what you're trying to achieve. The arrows are attached automatically if the property is set in the smartgraph.properties file, namely:

# only makes sense if displaying a directed graph 
edge.arrow = true

brunomnsilva avatar May 04 '23 21:05 brunomnsilva

Since 2.0.0-rc2 arrows are only placed if the underlying model is a Digraph and if edge.arrow = true. If the underlying model is simply a Graph, the arrows are not placed, ever.

brunomnsilva avatar Apr 03 '24 14:04 brunomnsilva