# all files / src/js/lite/ui/ ModalUI.js

12.5% Statements 3/24
0% Branches 0/4
16.67% Functions 1/6
8.7% Lines 2/23

    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
    361×

    2×

     (function(global){global.wrappers['/Users/lqez/Dev/summernote/src/js/lite/ui/ModalUI.js']=[function(require,module,exports,__dirname,__filename){ "use strict";
    exports.__esModule = true;
    var ModalUI = /** @class */ (function () {
        function ModalUI($node, options) {
            this.options = $.extend({}, {
                target: options.container || 'body'
            }, options);
            this.$modal = $node;
            this.$backdrop = $('<div class="note-modal-backdrop" />');
        }
        ModalUI.prototype.show = function () {
            if (this.options.target === 'body') {
                this.$backdrop.css('position', 'fixed');
                this.$modal.css('position', 'fixed');
            }
            else {
                this.$backdrop.css('position', 'absolute');
                this.$modal.css('position', 'absolute');
            }
            this.$backdrop.appendTo(this.options.target).show();
            this.$modal.appendTo(this.options.target).addClass('open').show();
            this.$modal.trigger('note.modal.show');
            this.$modal.off('click', '.close').on('click', '.close', this.hide.bind(this));
        };
        ModalUI.prototype.hide = function () {
            this.$modal.removeClass('open').hide();
            this.$backdrop.hide();
            this.$modal.trigger('note.modal.hide');
        };
        return ModalUI;
    }());
    exports["default"] = ModalUI;

    },'src/js/lite/ui/ModalUI.js',{}];})(this);
    //# sourceMappingURL=data:application/json;charset=utf-8;base64,