Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CurvedLinkReshapingTool

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

This CurvedLinkReshapingTool class allows for a Link's path to be modified by the user via the dragging of a single tool handle at the middle of the link. Dragging the handle changes the value of Link.curviness.

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

Index

Methods

Override doActivate

  • doActivate(): void
  • Start reshaping, if findToolHandleAt finds a reshape handle at the mouse down point.

    If successful this sets handle to be the reshape handle that it finds and adornedLink to be the Link being routed. It also remembers the original link route (a list of Points) and curviness in case this tool is cancelled. And it starts a transaction.

    Returns void

Override doCancel

  • doCancel(): void
  • Restore the link route to be the original points and curviness and stop this tool.

    Returns void

Override reshape

  • reshape(newpt: Point): void