@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
19 lines • 497 B
JavaScript
export class Section {
constructor(length, center) {
this._length = length;
this._center = center;
}
get length() {
return this._length;
}
get center() {
return this._center;
}
static fromAxisX(rectangle) {
return new Section(rectangle.width, rectangle.centerX);
}
static fromAxisY(rectangle) {
return new Section(rectangle.height, rectangle.centerY);
}
}
//# sourceMappingURL=Section.js.map