nsions/RescalingTool.js"></script>
<script id="code">
  function init() {

    myDiagram = new go.Diagram('myDiagramDiv', {
      'undoManager.isEnabled': true, // enable undo & redo
      layout: new go.TreeLayout()
    });

    // install the RescalingTool as a mouse-down tool
    myDiagram.toolManager.mouseDownTools.add(new RescalingTool());

    myDiagram.nodeTemplate = new go.Node('Auto')
      .add(
        new go.Shape('RoundedRectangle', { strokeWidth: 0 }).bind('fill', 'color'),
        new go.Text