Skip to content

Proposal: Edge offset property #36

@Gargafield

Description

@Gargafield

fromOffset and toOffset property

Currently creating three edges between a pair of nodes will create this clutter:

image

This is of course not very useful, and I therefor propose fromOffset and toOffset. The properties store an integer for the pixel offset of the edge. Where 0 is center of the side, positive being 'up' the side and negative being 'down' it. Meaning a positive offset will push the edge towards the positive axis of the side. For example, with toSide: 'bottom' will toOffset: -100 push the edge arrow 100 pixels towards -x (left).
Offsets other than 0 need to be clamped with in sideLength/2 and -sideLength/2, as the edge shouldn't be able to start and end past the node side.
The properties are optional and default to 0 (the center) when not defined.

image

// Edge object
{
   ...properties,
  "fromOffset": 0,
  "toOffset": 100
},
  • fromOffset (optional, integer) is the pixel offset on the side where this edge starts.
  • toOffset (optional, integer) is the pixel offset on the side where this edge ends.

This proposal shouldn't be considered done. I will try to accommodate any feedback.

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