all files / actions/ action.js

47.62% Statements 10/21
0% Branches 0/2
25% Functions 2/8
47.62% Lines 10/21
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                                                                      
define(["require", "exports", "./../primitives/pdf-dictionary", "./../primitives/pdf-reference", "./../primitives/pdf-name", "./../input-output/pdf-dictionary-properties"], function (require, exports, pdf_dictionary_1, pdf_reference_1, pdf_name_1, pdf_dictionary_properties_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var PdfAction = (function () {
        function PdfAction() {
            this.action = null;
            this.dictionaryProperties = new pdf_dictionary_properties_1.DictionaryProperties();
            this.initialize();
        }
        Object.defineProperty(PdfAction.prototype, "next", {
            get: function () {
                return this.action;
            },
            set: function (value) {
                this.action = value;
                this.dictionary.items.setValue(this.dictionaryProperties.next, new pdf_reference_1.PdfReferenceHolder(this.action));
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PdfAction.prototype, "dictionary", {
            get: function () {
                if (typeof this.pdfDictionary === 'undefined') {
                    this.pdfDictionary = new pdf_dictionary_1.PdfDictionary();
                }
                return this.pdfDictionary;
            },
            enumerable: true,
            configurable: true
        });
        PdfAction.prototype.initialize = function () {
            this.dictionary.items.setValue(this.dictionaryProperties.type, new pdf_name_1.PdfName(this.dictionaryProperties.action));
        };
        Object.defineProperty(PdfAction.prototype, "element", {
            get: function () {
                return this.dictionary;
            },
            enumerable: true,
            configurable: true
        });
        return PdfAction;
    }());
    exports.PdfAction = PdfAction;
});