UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

46 lines 1.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectionAnnotation = void 0; const index_1 = require("./../index"); class SelectionAnnotation { constructor(data) { this.objectKey = index_1.ObjectKeySelectionAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.objectKey); let pageDefault = 1; this.page = typeof (data === null || data === void 0 ? void 0 : data.page) !== "undefined" ? data === null || data === void 0 ? void 0 : data.page : pageDefault; this.position = index_1.Rectangle.fromJson(data === null || data === void 0 ? void 0 : data.position); } static getObjectKeyDescription() { return ""; } static getPageDefault() { return 1; } static getPageDescription() { return "Selects the page by page number, that shall contain the annotation."; } static getPageMin() { return 1; } static getPositionDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new SelectionAnnotation(data); } toJson() { var _a, _b; return { 'objectKey': (_a = this.objectKey) === null || _a === void 0 ? void 0 : _a.toJson(), 'page': this.page, 'position': (_b = this.position) === null || _b === void 0 ? void 0 : _b.toJson(), }; } clone() { return SelectionAnnotation.fromJson(this.toJson()); } } exports.SelectionAnnotation = SelectionAnnotation; //# sourceMappingURL=SelectionAnnotation.js.map