@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
28 lines • 1.1 kB
JavaScript
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 };
export var RotationType;
(function (RotationType) {
RotationType[RotationType["None"] = 0] = "None";
RotationType[RotationType["Rotate90"] = 90] = "Rotate90";
RotationType[RotationType["Rotate180"] = 180] = "Rotate180";
RotationType[RotationType["Rotate270"] = 270] = "Rotate270";
RotationType[RotationType["Auto"] = -1] = "Auto";
})(RotationType || (RotationType = {}));
//# sourceMappingURL=WorkspaceRotation.js.map