@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
21 lines • 763 B
JavaScript
import { RotationType } from "@aurigma/design-atoms-interfaces";
var WorkspaceRotation = /** @class */ (function () {
function WorkspaceRotation() {
}
WorkspaceRotation.prototype.rotate = function (surface, rotationType) {
surface.rotateAngle += this._getRotationTypeAngle(rotationType);
};
WorkspaceRotation.prototype._getRotationTypeAngle = function (rotationType) {
switch (rotationType) {
case RotationType.Rotate180:
return 180;
case RotationType.Rotate270:
return 270;
default:
return 90;
}
};
return WorkspaceRotation;
}());
export { WorkspaceRotation };
//# sourceMappingURL=WorkspaceRotation.js.map