UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

106 lines 6.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransitionActionSetTransition = void 0; class TransitionActionSetTransition { constructor(data) { let directionDefault = "leftToRight"; this.direction = typeof (data === null || data === void 0 ? void 0 : data.direction) !== "undefined" ? data === null || data === void 0 ? void 0 : data.direction : directionDefault; let durationDefault = 1; this.duration = typeof (data === null || data === void 0 ? void 0 : data.duration) !== "undefined" ? data === null || data === void 0 ? void 0 : data.duration : durationDefault; let effectDimensionHorizontalDefault = true; this.effectDimensionHorizontal = typeof (data === null || data === void 0 ? void 0 : data.effectDimensionHorizontal) !== "undefined" ? data === null || data === void 0 ? void 0 : data.effectDimensionHorizontal : effectDimensionHorizontalDefault; let flyAreaOpaqueDefault = false; this.flyAreaOpaque = typeof (data === null || data === void 0 ? void 0 : data.flyAreaOpaque) !== "undefined" ? data === null || data === void 0 ? void 0 : data.flyAreaOpaque : flyAreaOpaqueDefault; let flyScaleDefault = 100; this.flyScale = typeof (data === null || data === void 0 ? void 0 : data.flyScale) !== "undefined" ? data === null || data === void 0 ? void 0 : data.flyScale : flyScaleDefault; let motionInwardDefault = true; this.motionInward = typeof (data === null || data === void 0 ? void 0 : data.motionInward) !== "undefined" ? data === null || data === void 0 ? void 0 : data.motionInward : motionInwardDefault; let scalingDefault = 100; this.scaling = typeof (data === null || data === void 0 ? void 0 : data.scaling) !== "undefined" ? data === null || data === void 0 ? void 0 : data.scaling : scalingDefault; let styleDefault = "none"; this.style = typeof (data === null || data === void 0 ? void 0 : data.style) !== "undefined" ? data === null || data === void 0 ? void 0 : data.style : styleDefault; } static getDirectionDefault() { return "leftToRight"; } static getDirectionDescription() { return "The direction of the transition animation (provided that it can be applied to the animation).\n\n* leftToRight = From left to right\n* bottomToTop = From bottom to top\n* rightToLeft = From right to left\n* topToBottom = From top to bottom\n* topLeftToBottomRight = From top left to bottom right\n* none = Use the default value for the animation"; } static getDurationDefault() { return 1; } static getDurationDescription() { return "The page transition animation's duration, in seconds. Make sure to avoid excessively high values, as certain reader programs will force the entire animation to be displayed without any option for interrupting it. Moreover, an excessively long animation can result in display and execution errors in the reader program. Values under 10 seconds are recommended."; } static getDurationMin() { return 0; } static getEffectDimensionHorizontalDefault() { return true; } static getEffectDimensionHorizontalDescription() { return "Option for the split and blinds animation styles - used to define the axis along which the effect should happen. true corresponds to the horizontal axis; false to the vertical one."; } static getFlyAreaOpaqueDefault() { return false; } static getFlyAreaOpaqueDescription() { return "Option for the \"fly\" animation style - used to define whether the page background for the page that flies in should be transparent initially."; } static getFlyScaleDefault() { return 100; } static getFlyScaleDescription() { return "Option for the \"fly\" animation style - used to define the starting scale for the page that flies in. The page will smoothly be scaled from this starting scale all the way to the size of the page being displayed (defined as a percentage)."; } static getFlyScaleMin() { return 0; } static getFlyScaleMax() { return 6400; } static getMotionInwardDefault() { return true; } static getMotionInwardDescription() { return "Option for the split, box, and fly animation styles - defines whether the animation direction will be from the edges of the page towards the centre (true) or from the centre towards the edges (false)."; } static getScalingDefault() { return 100; } static getScalingDescription() { return "Used to set the value for zooming (as a percentage)."; } static getScalingMin() { return 0; } static getStyleDefault() { return "none"; } static getStyleDescription() { return "The style of transition animation.\n\n* blinds = Crossfades\n* box = Crossfades in a rectangular pattern\n* cover = Covers\n* dissolve = Dissolves\n* fade = Fades\n* fly = Page flies in\n* glitter = Page dissolves and is replaced\n* push = Page is pushed out\n* split = Splits page\n* uncover = Uncovers page\n* wipe = Wipes page\n* none = No special effect"; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new TransitionActionSetTransition(data); } toJson() { return { 'direction': this.direction, 'duration': this.duration, 'effectDimensionHorizontal': this.effectDimensionHorizontal, 'flyAreaOpaque': this.flyAreaOpaque, 'flyScale': this.flyScale, 'motionInward': this.motionInward, 'scaling': this.scaling, 'style': this.style, }; } clone() { return TransitionActionSetTransition.fromJson(this.toJson()); } } exports.TransitionActionSetTransition = TransitionActionSetTransition; //# sourceMappingURL=TransitionActionSetTransition.js.map