This is a minimalist HTML and JavaScript skeleton of the GoJS Sample CurvedLinkReshaping.html. It was automatically generated from a button on the sample page, and does not contain the full HTML. It is intended as a starting point to adapt for your own usage. For many samples, you may need to inspect the full source on Github and copy other files or scripts.

https://unpkg.com/gojs@2.2.15/extensions,CurvedLinkReshaping.htmlCurvedLinkReshapingTool.js">
This text is displayed if your browser does not support the Canvas HTML element.

This sample is a modification of the State Chart sample that makes use of the CurvedLinkReshapingTool that is defined in its own file, as CurvedLinkReshapingTool.js.

Note that unlike the standard case of a Bezier-curved Link that is Part.reshapable, there is only one reshape handle When the user drags that handle, the value of Link.curviness is modified, causing the link to be curved differently. This sample also defines a TwoWay Binding on that property, thereby saving the curviness to the model data. Unlike the regular State Chart sample, there is no Binding on Link.points, which is no longer needed when the curviness is the only modified property.

Diagram Model saved in JSON format:

GoJS version 2.2.15. Copyright 1998-2022 by Northwoods Software.

View this sample page's source on GitHub