UNPKG

@acdh-oeaw/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

22 lines 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.XYWHFragment = void 0; var XYWHFragment = /** @class */ (function () { function XYWHFragment(x, y, w, h) { this.x = x; this.y = y; this.w = w; this.h = h; } XYWHFragment.prototype.toString = function () { return "".concat(this.x, ",").concat(this.y, ",").concat(this.w, ",").concat(this.h); }; XYWHFragment.fromString = function (bounds) { bounds = bounds.replace("xywh=", ""); var boundsArr = bounds.split(","); return new XYWHFragment(Number(boundsArr[0]), Number(boundsArr[1]), Number(boundsArr[2]), Number(boundsArr[3])); }; return XYWHFragment; }()); exports.XYWHFragment = XYWHFragment; //# sourceMappingURL=XYWHFragment.js.map