JavaFXSmartGraph
JavaFXSmartGraph copied to clipboard
Weird behevior with arrow when reattach current arrow
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 ?
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
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.