UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

47 lines 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppearanceSvg = void 0; const index_1 = require("./../index"); class AppearanceSvg { constructor(data) { let aspectRatioAxisDefault = "x"; this.aspectRatioAxis = typeof (data === null || data === void 0 ? void 0 : data.aspectRatioAxis) !== "undefined" ? data === null || data === void 0 ? void 0 : data.aspectRatioAxis : aspectRatioAxisDefault; 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 getAspectRatioAxisDefault() { return "x"; } static getAspectRatioAxisDescription() { return "Selects a predefined axis for a coordinate system."; } 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 AppearanceSvg(data); } toJson() { var _a; return { 'aspectRatioAxis': this.aspectRatioAxis, 'data': (_a = this.data) === null || _a === void 0 ? void 0 : _a.toJson(), 'preserveAspectRatio': this.preserveAspectRatio, }; } clone() { return AppearanceSvg.fromJson(this.toJson()); } } exports.AppearanceSvg = AppearanceSvg; //# sourceMappingURL=AppearanceSvg.js.map