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

Note that after dragging a node label you can move that node and the label maintains the same position relative to the node. That relative position is specified by the GraphObject.alignment property, used by the "Spot" Panel. This sample also saves any changes to that property by means of a TwoWay Binding.

Diagram Model saved in JSON format:
加入 GoJS 交流群
GoJS 交流群 (769862113)