UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

40 lines 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PositionMarkupAnnotation = void 0; const index_1 = require("./../index"); class PositionMarkupAnnotation { constructor(data) { this.pathElement = (data.pathElement || []).map(index_1.Rectangle.fromJson); this.quadrilateral = (data.quadrilateral || []).map(index_1.Quadrilateral.fromJson); } static getPathElementDefault() { return []; } static getPathElementDescription() { return ""; } static getQuadrilateralDefault() { return []; } static getQuadrilateralDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new PositionMarkupAnnotation(data); } toJson() { var _a, _b; return { 'pathElement': (_a = this.pathElement) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), 'quadrilateral': (_b = this.quadrilateral) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()), }; } clone() { return PositionMarkupAnnotation.fromJson(this.toJson()); } } exports.PositionMarkupAnnotation = PositionMarkupAnnotation; //# sourceMappingURL=PositionMarkupAnnotation.js.map