Closed AlanHohn closed 5 years ago
Can you resolve conflicts and maybe also a short sample how this is being used?
Thanks for taking a look. I fixed the merge conflict.
I did make some changes to demos/arrows.html
to show how you'd use it; please let me know if you prefer me to add samples somewhere else as well.
Basically it adds the attributes arrowmid
and arrowtail
to edges so you can place markers there as well. The value of those attributes is identical to arrowhead
(i.e. the name of the arrow style).
I did have to do a little update to the standard "normal" and "vee" arrows to detect when they're being used as arrowtail
so they can draw themselves upside down (orient: auto
on the marker aligns them with the edge but it doesn't flip the point of the arrow). Anyone who wants to use arrowtail
with custom arrows would need to do the same but the change doesn't break any existing use of arrowhead
.
So long story short you'd make a double-headed arrow edge like this:
g.setEdge("leftNode", "rightNode", {
arrowhead: "normal",
arrowtail: "normal"
});
I need this feature,thx!
Hi all, Will this feature branch merge to master? It would be a great feature for me. Thanks!
I'd love to use this too!
Also keen to have this merge
Did the merge happen?
Updated to #361.
Adds "arrowtail" and "arrowmid" attributes to edges.
Default to "undirected" so default behavior is the same.
Fixes #194