Rotating a node

Following closely to the floorplan example, I have added a textblock to my node like this

myDiagram.nodeTemplate =
            $$(go.Node, "Vertical",
                {
                    locationObjectName: "SHAPE",
                    locationSpot: go.Spot.Center,
                    toolTip: tooltiptemplate,
                    selectionAdorned: false // use a Binding on the Shape.stroke to show selection
                },
                // remember the location of this Node
                new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
                // move a selected part into the Foreground layer, so it isn't obscured by any non-selected parts
                new go.Binding("layerName", "isSelected", function (s) { return s ? "Foreground" : ""; }).ofObject(),
                // can be resided according to the user's desires
                { resizable: true, resizeObjectName: "SHAPE" },
                { rotatable: true, rotateObjectName: "SHAPE" },
                $$(go.Shape,
                    {
                        name: "SHAPE",
                        geometryString: "F1 M0 0 L20 0 20 20 0 20 z",
                        fill: "rgb(130, 130, 256)"
                    },
                    // this determines the actual shape of the Shape
                    new go.Binding("geometryString", "geo"),
                    // allows the color to be determined by the node data
                    new go.Binding("fill", "color"),
                    // selection causes the stroke to be blue instead of black
                    new go.Binding("stroke", "isSelected", function (s) { return s ? "dodgerblue" : "black"; }).ofObject(),
                    // remember the size of this node
                    new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
                    // can set the angle of this Node
                    new go.Binding("angle", "angle").makeTwoWay()
                ),
                $$(go.TextBlock,
                    { editable: true, name: "LABEL" },
                    new go.Binding("text", "name"))
            );

However, when I try to rotate, I get this error:

<span style="-sizing: border-; color: rgb255, 0, 0; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 12px; orphans: auto; text-align: left; text-indent: 0px; text-trans: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; : rgb255, 255, 255;">Uncaught TypeError: Object #<HTMLDivElement> has no method 'startTransaction'</span><span style="color: rgb255, 0, 0; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 12px; orphans: auto; text-align: left; text-indent: 0px; text-trans: none; white-space: pre-wrap; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; : rgb255, 255, 255; display: inline !imant; : none;"> </span>

It appears that some code has replaced the value of a variable that should be of type Diagram with a reference to an HTML div element. Look on the stack to find the name of that variable, and then examine the initialization and all assignments of that variable.

But all my other commands work fine. E.g., copy/paste/cut/selectall

I do not believe that I have ever seen that error message before. You will need to debug it to see why there is some code thinking that a DIV is a Diagram, calling a Diagram method on it.