UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

67 lines 2.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OptionsMargin = void 0; class OptionsMargin { constructor(data) { let bottomDefault = 0; this.bottom = typeof (data === null || data === void 0 ? void 0 : data.bottom) !== "undefined" ? data === null || data === void 0 ? void 0 : data.bottom : bottomDefault; let leftDefault = 0; this.left = typeof (data === null || data === void 0 ? void 0 : data.left) !== "undefined" ? data === null || data === void 0 ? void 0 : data.left : leftDefault; let metricsDefault = "mm"; this.metrics = typeof (data === null || data === void 0 ? void 0 : data.metrics) !== "undefined" ? data === null || data === void 0 ? void 0 : data.metrics : metricsDefault; let rightDefault = 0; this.right = typeof (data === null || data === void 0 ? void 0 : data.right) !== "undefined" ? data === null || data === void 0 ? void 0 : data.right : rightDefault; let topDefault = 0; this.top = typeof (data === null || data === void 0 ? void 0 : data.top) !== "undefined" ? data === null || data === void 0 ? void 0 : data.top : topDefault; } static getBottomDefault() { return 0; } static getBottomDescription() { return "The offset from the bottom edge of the surrounding element."; } static getLeftDefault() { return 0; } static getLeftDescription() { return "The offset from the left edge of the surrounding element."; } static getMetricsDefault() { return "mm"; } static getMetricsDescription() { return "Unit for the X-axis\/Y-axis position and signature field height and width arguments:\n\n* pt = Points(1\/72 inch)\n* pc = Picas(12 points)\n* px = Pixels(1\/96 inch)\n* mm = Millimeters\n* in = Inches"; } static getRightDefault() { return 0; } static getRightDescription() { return "The offset from the right edge of the surrounding element."; } static getTopDefault() { return 0; } static getTopDescription() { return "The offset from the upper edge of the surrounding element."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new OptionsMargin(data); } toJson() { return { 'bottom': this.bottom, 'left': this.left, 'metrics': this.metrics, 'right': this.right, 'top': this.top, }; } clone() { return OptionsMargin.fromJson(this.toJson()); } } exports.OptionsMargin = OptionsMargin; //# sourceMappingURL=OptionsMargin.js.map