Skip to content

Allow more control over cubic-curve styled edges #22

@barrybecker4

Description

@barrybecker4

Currently, when the edges of a graph are styled with
shape: cubic-curve;
they are curved in a seemingly arbitrary way and it rarely looks how I want.
For example, here is a graph where the edges are styled with cubic-curve:
image
Note that there are discontinuities at the nodes because the Bezier control vectors are either horizontal or vertical and determined by the angle between the source and destination vertices.

What I propose is a simple backward compatible change that would allow optionally specifying a control point for an edge that would determine the quadratic Bezier to use for its curvature like this:
image

If an edge has the "ui.control-point" attribute set, then the edge renderer will draw a quadratic Bezier curve using that control point. The implementation is simple, and will give a lot of extra control. I will make a PR.

After adding the control point, I can get the curved edges to look they way that I want.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions