UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

38 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppearanceImage = void 0; const index_1 = require("./../index"); class AppearanceImage { constructor(data) { this.data = index_1.AppearanceFileData.fromJson(data.data); let preserveAspectRatioDefault = false; this.preserveAspectRatio = typeof (data === null || data === void 0 ? void 0 : data.preserveAspectRatio) !== "undefined" ? data === null || data === void 0 ? void 0 : data.preserveAspectRatio : preserveAspectRatioDefault; } static getDataDescription() { return ""; } static getPreserveAspectRatioDefault() { return false; } static getPreserveAspectRatioDescription() { return "Specifies whether the aspect ratio should be maintained when scaling the annotation."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new AppearanceImage(data); } toJson() { var _a; return { 'data': (_a = this.data) === null || _a === void 0 ? void 0 : _a.toJson(), 'preserveAspectRatio': this.preserveAspectRatio, }; } clone() { return AppearanceImage.fromJson(this.toJson()); } } exports.AppearanceImage = AppearanceImage; //# sourceMappingURL=AppearanceImage.js.map