all files / document-editor-container/properties-pane/ text-properties-pane.js

96.97% Statements 32/33
50% Branches 3/6
100% Functions 7/7
96.97% Lines 32/33
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   60× 60× 60× 60× 60×   60× 60× 60× 60× 60× 60×       60× 60×   65× 65×   59× 59× 59×   59× 59× 59×   59×        
define(["require", "exports", "@syncfusion/ej2-base", "./text-properties", "./paragraph-properties"], function (require, exports, ej2_base_1, text_properties_1, paragraph_properties_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var TextProperties = (function () {
        function TextProperties(container, id, isTableProperties, isRtl) {
            this.container = container;
            this.text = new text_properties_1.Text(container, isRtl);
            this.paragraph = new paragraph_properties_1.Paragraph(container);
            this.initializeTextProperties(id, isTableProperties, isRtl);
            this.wireEvents();
        }
        TextProperties.prototype.initializeTextProperties = function (id, isTableProperties, isRtl) {
            this.element = ej2_base_1.createElement('div', { className: 'e-de-prop-pane e-de-scrollbar-hide' });
            this.element.setAttribute('tabindex', '0');
            this.text.initializeTextPropertiesDiv(this.element, isRtl);
            this.paragraph.initializeParagraphPropertiesDiv(this.element, isRtl);
            this.paragraph.updateStyleNames();
            Iif (!isTableProperties) {
                this.container.propertiesPaneContainer.appendChild(this.element);
            }
        };
        TextProperties.prototype.wireEvents = function () {
            this.text.wireEvent();
            this.paragraph.wireEvent();
        };
        TextProperties.prototype.onSelectionChange = function () {
            this.text.onSelectionChange();
            this.paragraph.onSelectionChange();
        };
        TextProperties.prototype.destroy = function () {
            Eif (this.text) {
                this.text.destroy();
                this.text = undefined;
            }
            Eif (this.paragraph) {
                this.paragraph.destroy();
                this.paragraph = undefined;
            }
            this.container = undefined;
        };
        return TextProperties;
    }());
    exports.TextProperties = TextProperties;
});