# Class CurvedLinkReshapingTool

GoJS® Diagramming Components
version 3.0.7
by Northwoods Software®

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. See the Extensions intro page for more information.

#### Hierarchy

- LinkReshapingTool
  - CurvedLinkReshapingTool

This CurvedLinkReshapingTool class allows for a go.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 go.Link.curviness.

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

#####
Index

### Constructors

constructor

### Methods

doActivate
doCancel
reshape

#####
Inherited Index

### Accessors

LinkReshapingTool.adornedLink
LinkReshapingTool.handle
LinkReshapingTool.handleArchetype
LinkReshapingTool.midHandleArchetype
LinkReshapingTool.originalPoint
LinkReshapingTool.originalPoints
LinkReshapingTool.resegmentingDistance
Tool.diagram
Tool.isActive
Tool.isEnabled
Tool.name
Tool.transactionResult

### Methods

LinkReshapingTool.canStart
LinkReshapingTool.computeReshape
LinkReshapingTool.doDeactivate
LinkReshapingTool.doMouseMove
LinkReshapingTool.doMouseUp
LinkReshapingTool.getReshapingBehavior
LinkReshapingTool.setReshapingBehavior
LinkReshapingTool.stopTransaction
LinkReshapingTool.updateAdornments
Tool.canStartMultiTouch
Tool.cancelWaitAfter
Tool.doKeyDown
Tool.doKeyUp
Tool.doMouseDown
Tool.doMouseWheel
Tool.doStart
Tool.doStop
Tool.doWaitAfter
Tool.findToolHandleAt
Tool.isBeyondDragSize
Tool.standardMouseClick
Tool.standardMouseOver
Tool.standardMouseSelect
Tool.standardMouseWheel
Tool.standardPinchZoomMove
Tool.standardPinchZoomStart
Tool.standardWaitAfter
Tool.startTransaction
Tool.stopTool

## Constructors

### constructor

- new CurvedLinkReshapingTool(init?: Partial<CurvedLinkReshapingTool>): CurvedLinkReshapingTool

- #### Parameters

  - ##### `Optional` init: Partial<CurvedLinkReshapingTool>

  #### Returns CurvedLinkReshapingTool

## 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 go.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

- Change the route of the adornedLink by moving the point corresponding to the current handle to be at the given go.Point. This is called by doMouseMove and doMouseUp with the result of calling computeReshape to constrain the input point.

  #### Parameters

  - ##### newpt: Point

    the value of the call to computeReshape.

  #### Returns void

Copyright © 1998-2024 by Northwoods Software Corporation.