I want to show the rotate icon where I marked it, but I want it to rotate the inside icon.
How can I do that?
My template:
this.diagram.nodeTemplateMap.add("", goMake(go.Node, "Spot", {
zOrder: 5,
locationObjectName: "Shape",
locationSpot: go.Spot.Center,
selectionAdornmentTemplate: nodeSelectionAdornmentTemplate,
selectionObjectName: "Shape",
resizeObjectName: "Shape",
rotateObjectName: "Shape",
resizeAdornmentTemplate: nodeResizeAdornmentTemplate,
resizable: this.props.config.nodeConfig.resizable,
rotatable: true,
rotateAdornmentTemplate: nodeRotateAdornmentTemplate,
isShadowed: true,
shadowVisible: false,
shadowBlur: 10,
background: "transparent",
shadowOffset: new go.Point(0, 0),
click: (e: go.InputEvent, obj: go.GraphObject) => {
if (obj && obj.part && obj.part.data && obj.part.data.nodeConfig && obj.part.data.nodeConfig.isLock) {
this.diagram.select(obj.part);
}
},
doubleClick: () => {
this.openPropertyInspector();
},
mouseEnter: (e: go.InputEvent, node: go.Node) => {
(node as any).findObject("RotateIcon").fill = 'rgba(114,168,232, 0.12)';
},
mouseLeave: (e, node) => {
(node as any).findObject("RotateIcon").fill = 'transparent';
}
},
this.makeSubNodeBinding("shadowColor", "textBackgroundColor"),
new go.Binding("location", "", this.bindShapeLocation).makeTwoWay(this.converterShapeLocation),
this.makeSubNodeBinding("isActionable", "isLock"),
goMake(go.Panel, "Auto",
goMake(go.Shape, "RoundedRectangle", { name: "RotateIcon", fill: "transparent", strokeWidth: 0 }),
goMake(go.Panel, "Vertical", { margin: new go.Margin(0, 0, 0, 0) },
goMake(go.Panel, "Spot",
goMake(go.Panel, "Spot",
{
shadowVisible: false,
name: "Shape"
},
new go.Binding("desiredSize", "", this.bindShapeSize).makeTwoWay(this.converterShapeSize),
new go.Binding("angle", "", this.bindShapeAngle).makeTwoWay(this.converterShapeAngle),
this.getNodeShape()
)
),
goMake(go.Panel, "Spot", { margin: new go.Margin(2.5, 0, 0, 0) },
goMake(go.Panel, "Auto",
goMake(go.Shape, "RoundedRectangle", { fill: "rgba(0, 0, 0, 0.05)", strokeWidth: 0 },
this.makeSubNodeBinding("fill", "textBackgroundColor"),
),
goMake(go.TextBlock,
{
editable: true,
stroke: "black",
font: "6pt sans-serif",
verticalAlignment: go.Spot.Center,
alignment: go.Spot.Center,
margin: new go.Margin(1, 5, 0, 5),
background: "transparent"
},
new go.Binding("text", "", this.bindShapeText).makeTwoWay(this.converterShapeText),
new go.Binding("font", "", this.bindShapeTextFont),
this.makeSubNodeBinding("textAlign", "textAlignment"),
this.makeSubNodeBinding("isUnderline", "textIsUnderline"),
this.makeSubNodeBinding("stroke", "textColor")
)
)
)
)
)
));