all files / document/automatic-fields/ automatic-field-info.js

64.71% Statements 22/34
66.67% Branches 6/9
63.64% Functions 7/11
64.71% Lines 22/34
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71   10× 10× 10× 10× 10×           10× 10× 10×                   10×                 10×                 10×                 10×                    
define(["require", "exports", "./../../drawing/pdf-drawing", "./automatic-field"], function (require, exports, pdf_drawing_1, automatic_field_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfAutomaticFieldInfo = (function () {
        function PdfAutomaticFieldInfo(field, location, scaleX, scaleY) {
            this.pageNumberFieldLocation = new pdf_drawing_1.PointF();
            this.pageNumberField = null;
            this.scaleX = 1;
            this.scaleY = 1;
            Iif (typeof location === 'undefined' && field instanceof PdfAutomaticFieldInfo) {
                this.pageNumberField = field.field;
                this.pageNumberFieldLocation = field.location;
                this.scaleX = field.scalingX;
                this.scaleY = field.scalingY;
            }
            else Eif (typeof scaleX === 'undefined' && location instanceof pdf_drawing_1.PointF && field instanceof automatic_field_1.PdfAutomaticField) {
                this.pageNumberField = field;
                this.pageNumberFieldLocation = location;
            }
            else {
                this.pageNumberField = field;
                this.pageNumberFieldLocation = location;
                this.scaleX = scaleX;
                this.scaleY = scaleY;
            }
        }
        Object.defineProperty(PdfAutomaticFieldInfo.prototype, "location", {
            get: function () {
                return this.pageNumberFieldLocation;
            },
            set: function (value) {
                this.pageNumberFieldLocation = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfAutomaticFieldInfo.prototype, "field", {
            get: function () {
                return this.pageNumberField;
            },
            set: function (value) {
                this.pageNumberField = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingX", {
            get: function () {
                return this.scaleX;
            },
            set: function (value) {
                this.scaleX = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingY", {
            get: function () {
                return this.scaleY;
            },
            set: function (value) {
                this.scaleY = value;
            },
            enumerable: true,
            configurable: true
        });
        return PdfAutomaticFieldInfo;
    }());
    exports.PdfAutomaticFieldInfo = PdfAutomaticFieldInfo;
});