graphviz-visual-editor icon indicating copy to clipboard operation
graphviz-visual-editor copied to clipboard

Make it easier to interact with edges

Open magjac opened this issue 7 years ago • 0 comments

Currently, edges must be interacted with through the arrow head or tail or through the sometimes very thin edge path itself which makes it a little hard to select them. This is analogous to how the URL attribute works:

For svg [...] output, [...]. For edges, the active areas are small circles where the edge contacts its head and tail nodes. In addition [...] the active area includes a thin polygon approximating the edge [...]. If the edge has a label, this will also be active. Finally, if the edge has a head or tail label, this will also be active.

Ideas

  • When displaying the graph, add an invisible overlay path that can be used to select the edge and has the same attributes as the real edge path, but with a stroke-width attribute with a larger value and stroke="transparent". An algorithm for calculating the width can be based on: https://github.com/magjac/graphviz-visual-editor/blob/d44e643eb0f801e2797e1a2ff7ad76640bd8499e/src/Graph.js#L529.

magjac avatar Sep 20 '18 10:09 magjac