RotatingTool.js 679 Bytes
Newer Older
1
/* eslint-disable */
涂茜's avatar
涂茜 committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
function TopRotatingTool() {
  go.RotatingTool.call(this);
}
go.Diagram.inherit(TopRotatingTool, go.RotatingTool);

/** @override */
TopRotatingTool.prototype.updateAdornments = function (part) {
  go.RotatingTool.prototype.updateAdornments.call(this, part);
  var adornment = part.findAdornment('Rotating');
  if (adornment !== null) {
    adornment.location = part.rotateObject.getDocumentPoint(new go.Spot(0.5, 0, 0, -30)); // above middle top
  }
};

/** @override */
TopRotatingTool.prototype.rotate = function (newangle) {
  go.RotatingTool.prototype.rotate.call(this, newangle + 90);
};
// end of TopRotatingTool class
export default TopRotatingTool;