computeEndSegmentLength method

num computeEndSegmentLength(
  1. Spot spot,
  2. bool from, [
  3. Node? node,
  4. GraphObject? port,
])

Get the length of the end segment in document coordinates, typically a short distance, in document units. For spot values that are Spot#isSide, this returns a computed value. Depending on the from argument, this will return #fromEndSegmentLength or #toEndSegmentLength. If the value is NaN, this will return the #fromPort's GraphObject#fromEndSegmentLength or the #toPort's GraphObject#toEndSegmentLength.

This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {Node} node @param {GraphObject} port the GraphObject representing a port on the node. @param {Spot} spot a Spot value describing where the link should connect. @param {boolean} from true if the link is coming out of the port; false if going to the port. @return {number} a distance in document coordinates; must be a real number, not NaN or infinity. @since 1.6

Implementation

_i2.num computeEndSegmentLength(
  _i3.Spot spot,
  _i2.bool from, [
  _i3.Node? node,
  _i3.GraphObject? port,
]) =>
    _i4.callMethod(
      this,
      'computeEndSegmentLength',
      [
        node ?? _i5.undefined,
        port ?? _i5.undefined,
        spot,
        from,
      ],
    );