That depends on how you have defined your node template. If you have set Part.rotateObjectName, then perhaps it would be easiest if you modified DrawCommandHandler.rotate to operate on the Part.rotateObject instead of the whole Part.
can you give me an example code to use DrawCommandHandler.rotate to operate on the Part.rotateObject instead of the whole Part???
My Sample is:-
DrawCommandHandler.prototype.rotate = function(angle) {
if (angle === undefined) angle = 90;
var diagram = this.diagram;
diagram.startTransaction("rotate " + angle.toString());
var diagram = this.diagram;
diagram.selection.each(function(current) {
var shape = current.findObject(“img”);
if (current instanceof go.Link || current instanceof go.Group) return; // skips over Links and Groups
current.angle += angle;
});
diagram.commitTransaction("rotate " + angle.toString());
};
I got the Shape, I can not find how to rotate it only.