rst();
        if (next) {
          new go.List(node.findLinksInto()).each((link) => (link.toNode = next));
        }
      }
    }

    // initialize Palette
    myPalette = new go.Palette('myPaletteDiv', {
      maxSelectionCount: 1,
      nodeTemplateMap: myDiagram.nodeTemplateMap,
      model: new go.GraphLinksModel([
        { text: 'Action' },
        { text: 'For Each', category: 'For' },
        { text: 'While', category: 'While' },
        { text: 'If', category: 'If' },
        { text: 'Switch', 