Interface Shape

a shape callable used to truncate an edge path at a node

This represents how to tweak the edge of a link conditioned on the shape of the node. This is useful for adding endings to an link (like arrows) that will align with a node well.

Hierarchy

  • Shape
  • compute the new start link edge point from the current settings

    This should return a new "start" point that touches the edge of the desired shape. In all cases, start should equal center and end should be ouside of the bounding box, but it won't hurt for implementations to be robust in case this isn't true.

    Parameters

    • center: readonly [number, number]

      the center of the node

    • nodeSize: readonly [number, number]

      the bounding box size of the node

    • start: readonly [number, number]

      the start of the path edge

    • end: readonly [number, number]

      the end of the path edge

    Returns [number, number]

    the new start point for the edge of the shape

Generated using TypeDoc