@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
41 lines • 1.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LayerStateSetOCGStateAction = void 0;
const index_1 = require("./../index");
class LayerStateSetOCGStateAction {
constructor(data) {
this.referencedLayer = (data.referencedLayer || []).map(index_1.OCGSelection.fromJson);
let stateDefault = "ON";
this.state = typeof (data === null || data === void 0 ? void 0 : data.state) !== "undefined" ? data === null || data === void 0 ? void 0 : data.state : stateDefault;
}
static getReferencedLayerDefault() {
return [];
}
static getReferencedLayerDescription() {
return "";
}
static getStateDefault() {
return "ON";
}
static getStateDescription() {
return "The status change that should be carried out upon activation.\n\n* ON = The layer(s) will be shown.\n* OFF = The layer(s) will be hidden.\n* Toggle = The layer visibility will be switched.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new LayerStateSetOCGStateAction(data);
}
toJson() {
var _a;
return {
'referencedLayer': (_a = this.referencedLayer) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()),
'state': this.state,
};
}
clone() {
return LayerStateSetOCGStateAction.fromJson(this.toJson());
}
}
exports.LayerStateSetOCGStateAction = LayerStateSetOCGStateAction;
//# sourceMappingURL=LayerStateSetOCGStateAction.js.map