moweex-img-cropper
Version:
image cropper
22 lines • 716 B
JavaScript
import { Bounds } from "./bounds";
var CropPosition = /** @class */ (function () {
function CropPosition(x, y, w, h) {
if (x === void 0) { x = 0; }
if (y === void 0) { y = 0; }
if (w === void 0) { w = 0; }
if (h === void 0) { h = 0; }
this.x = +x;
this.y = +y;
this.w = +w;
this.h = +h;
}
CropPosition.prototype.toBounds = function () {
return new Bounds(this.x, this.y, this.w, this.h);
};
CropPosition.prototype.isInitialized = function () {
return this.x !== 0 && this.y !== 0 && this.w !== 0 && this.h !== 0;
};
return CropPosition;
}());
export { CropPosition };
//# sourceMappingURL=cropPosition.js.map