flutter_graphite icon indicating copy to clipboard operation
flutter_graphite copied to clipboard

Double-headed edges

Open Dragemil opened this issue 3 years ago • 3 comments

Is there an easy way to maybe pass a flag to the graph, that if you had an edge x -> y and an edge y -> x it would be drawn as single double-headed edge, rather than two edges?

Also, is there a possibility to label edges with text?

Or do I have to provide whole EdgePaintBuilder/EdgePathBuilder, which seems rather complicated?

Dragemil avatar Dec 16 '20 20:12 Dragemil

@Dragemil
For <-> sounds reasonable. It's not to hard to implement via some kind of edges "merge", but currently not available. About labels on edges: Because widget is built on top of custom painter, it's hard to implement this feature - you need to handle edges size and graph orientation properly to centralise your text and avoid overlaps. I have React.js version of this lib which uses SVG rendering. This version has edge labels implemented by some other guy, but I'm not satisfied with the result. If you want to make your contribution, please do so. I had plan for version 1.0.0 with new type of matrix (with 2 cells per 1 object instead of 1), but for now I don't have time to work on this.

lempiy avatar Dec 17 '20 12:12 lempiy

Hi @Dragemil, Did you able to label edges with text?

hareendranmg avatar May 03 '21 08:05 hareendranmg

Sorry, unfortunately I didn't need the labaled edges in the end.

Dragemil avatar May 03 '21 09:05 Dragemil