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.
Constructs an PolylineLinkingTool, sets portGravity to 0, and sets the name for the tool.
Optional
init: Partial<PolylineLinkingTool>Override
doOverride
doOverride
doOverride
doOverride
doIf this event happens on a valid target port (as determined by go.LinkingBaseTool.findTargetPort), we complete the link drawing operation. insertLink is overridden to transfer the accumulated route drawn by user clicks to the new go.Link that was created.
If this event happens elsewhere in the diagram, this tool is not stopped: the drawing of the route continues.
Override
insertThis method overrides the standard link creation method by additionally replacing the default link route with the custom one laid out by the user.
The PolylineLinkingTool class the user to draw a new go.Link by clicking where the route should go, until clicking on a valid target port.
This tool supports routing both orthogonal and straight links. You can customize the go.LinkingBaseTool.temporaryLink as needed to affect the appearance and behavior of the temporary link that is shown during the linking operation. You can customize the go.LinkingTool.archetypeLinkData to specify property values that can be data-bound by your link template for the Links that are actually created.
If you want to experiment with this extension, try the Polyline Linking sample.