Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OrthogonalLinkReshapingTool

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. Extensions can be found in the GoJS kit under the extensions or extensionsTS folders. See the Extensions intro page for more information.

Hierarchy

The OrthogonalLinkReshapingTool class lets a user drag a tool handle along the link segment, which will move the whole segment.

If you want to experiment with this extension, try the Orthogonal Link Reshaping sample.

Index

Constructors

constructor

Methods

Override doDeactivate

  • doDeactivate(): void
  • This stops the current reshaping operation and updates any link handles.

    Returns void

isApprox

  • isApprox(x: number, y: number): boolean
  • Compare two numbers to ensure they are almost equal. Used in this class for comparing coordinates of Points.

    Parameters

    • x: number
    • y: number

    Returns boolean

makeSegmentDragHandle

  • makeSegmentDragHandle(link: Link, adornment: Adornment, index: number): void
  • Create the segment dragging handles. There are two parts: one invisible handle that spans the segment, and a visible handle at the middle of the segment. These are inserted at the front of the adornment such that the normal handles have priority.

    Parameters

    Returns void

Override reshape

  • reshape(newpt: Point): void
  • Change the route of the adornedLink by moving the segment corresponding to the current handle to be at the given Point.

    Parameters

    Returns void