@aurigma/design-atoms-model
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
75 lines • 2.91 kB
JavaScript
import { RgbColors } from "../Colors";
var CropMark = /** @class */ (function () {
function CropMark() {
this.name = "cropmark";
this.margin = 10;
this.color = RgbColors.black;
this.widthPx = 1;
this.length = 8;
this.leftNotes = null;
this.topNotes = null;
this.rightNotes = null;
this.bottomNotes = null;
}
Object.defineProperty(CropMark.prototype, "margins", {
get: function () {
if (typeof this.margin === "number")
return { horizontal: this.margin, vertical: this.margin };
else
return this.margin;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CropMark.prototype, "lengths", {
get: function () {
if (typeof this.length === "number")
return { horizontal: this.length, vertical: this.length };
else
return this.length;
},
enumerable: true,
configurable: true
});
CropMark.prototype.clone = function () {
var clone = new CropMark();
clone.name = this.name;
clone.margin = this.margin;
clone.color = this.color;
clone.widthPx = this.widthPx;
clone.length = this.length;
clone.leftNotes = this.leftNotes != null ? this.leftNotes.map(function (n) { return n.clone(); }) : null;
clone.topNotes = this.topNotes != null ? this.topNotes.map(function (n) { return n.clone(); }) : null;
clone.rightNotes = this.rightNotes != null ? this.rightNotes.map(function (n) { return n.clone(); }) : null;
clone.bottomNotes = this.bottomNotes != null ? this.bottomNotes.map(function (n) { return n.clone(); }) : null;
return clone;
};
return CropMark;
}());
export { CropMark };
export var CropMarkTextAlignment;
(function (CropMarkTextAlignment) {
CropMarkTextAlignment[CropMarkTextAlignment["Left"] = 0] = "Left";
CropMarkTextAlignment[CropMarkTextAlignment["Center"] = 1] = "Center";
CropMarkTextAlignment[CropMarkTextAlignment["Right"] = 2] = "Right";
})(CropMarkTextAlignment || (CropMarkTextAlignment = {}));
var CropMarkText = /** @class */ (function () {
function CropMarkText() {
this.alignment = CropMarkTextAlignment.Left;
this.fontSize = 3;
this.edgeMargin = 0.3;
this.markMargin = 0.3;
}
CropMarkText.prototype.clone = function () {
var clone = new CropMarkText();
clone.alignment = this.alignment;
clone.fontSize = this.fontSize;
clone.text = this.text;
clone.edgeMargin = this.edgeMargin;
clone.markMargin = this.markMargin;
return clone;
};
return CropMarkText;
}());
export { CropMarkText };
//# sourceMappingURL=CropMark.js.map