@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
42 lines • 1.29 kB
JavaScript
var Rubberband = /** @class */ (function () {
function Rubberband(_left, _top, _right, _bottom) {
this._left = _left;
this._top = _top;
this._right = _right;
this._bottom = _bottom;
}
Object.defineProperty(Rubberband.prototype, "left", {
get: function () {
return this._left;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Rubberband.prototype, "top", {
get: function () {
return this._top;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Rubberband.prototype, "right", {
get: function () {
return this._right;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Rubberband.prototype, "bottom", {
get: function () {
return this._bottom;
},
enumerable: true,
configurable: true
});
Rubberband.prototype.translate = function (shift) {
return new Rubberband(this.left + shift.x, this.top + shift.y, this.right + shift.x, this.bottom + shift.y);
};
return Rubberband;
}());
export { Rubberband };
//# sourceMappingURL=Rubberband.js.map