@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
67 lines • 2.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Border = void 0;
class Border {
constructor(data) {
let borderStyleDefault = "solid";
this.borderStyle = typeof (data === null || data === void 0 ? void 0 : data.borderStyle) !== "undefined" ? data === null || data === void 0 ? void 0 : data.borderStyle : borderStyleDefault;
let borderWidthDefault = 1;
this.borderWidth = typeof (data === null || data === void 0 ? void 0 : data.borderWidth) !== "undefined" ? data === null || data === void 0 ? void 0 : data.borderWidth : borderWidthDefault;
let dashLengthDefault = 3;
this.dashLength = typeof (data === null || data === void 0 ? void 0 : data.dashLength) !== "undefined" ? data === null || data === void 0 ? void 0 : data.dashLength : dashLengthDefault;
let gapLengthDefault = 3;
this.gapLength = typeof (data === null || data === void 0 ? void 0 : data.gapLength) !== "undefined" ? data === null || data === void 0 ? void 0 : data.gapLength : gapLengthDefault;
}
static getBorderStyleDefault() {
return "solid";
}
static getBorderStyleDescription() {
return "Defines the border style.\n\n* solid = A solid line border.\n* dashed = A dashed border using the given dash and gap length.";
}
static getBorderWidthDefault() {
return 1;
}
static getBorderWidthDescription() {
return "Defines the border width\/strength\/thickness.";
}
static getBorderWidthMin() {
return 0;
}
static getDashLengthDefault() {
return 3;
}
static getDashLengthDescription() {
return "The interval length of dashes for a border with a \"dashed\" style.";
}
static getDashLengthMin() {
return 1;
}
static getGapLengthDefault() {
return 3;
}
static getGapLengthDescription() {
return "The interval length of gaps for a border with a \"dashed\" style.";
}
static getGapLengthMin() {
return 1;
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new Border(data);
}
toJson() {
return {
'borderStyle': this.borderStyle,
'borderWidth': this.borderWidth,
'dashLength': this.dashLength,
'gapLength': this.gapLength,
};
}
clone() {
return Border.fromJson(this.toJson());
}
}
exports.Border = Border;
//# sourceMappingURL=Border.js.map