@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
24 lines • 609 B
JavaScript
export class Rubberband {
constructor(_left, _top, _right, _bottom) {
this._left = _left;
this._top = _top;
this._right = _right;
this._bottom = _bottom;
}
get left() {
return this._left;
}
get top() {
return this._top;
}
get right() {
return this._right;
}
get bottom() {
return this._bottom;
}
translate(shift) {
return new Rubberband(this.left + shift.x, this.top + shift.y, this.right + shift.x, this.bottom + shift.y);
}
}
//# sourceMappingURL=Rubberband.js.map