# all files / src/js/base/module/ Statusbar.js

62.5% Statements 20/32
37.5% Branches 3/8
66.67% Functions 6/9
61.29% Lines 19/31

    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
    431×
    1×
    1×
    1×
    1×
    2×
    97×
    97×
    97×
    97×

    1×
    97×
    97×

    97×

    1×
    2×
    2×

    1×

    1×

     (function(global){global.wrappers['/Users/lqez/Dev/summernote/src/js/base/module/Statusbar.js']=[function(require,module,exports,__dirname,__filename){ "use strict";
    exports.__esModule = true;
    var jquery_1 = require("jquery");
    var EDITABLE_PADDING = 24;
    var Statusbar = /** @class */ (function () {
        function Statusbar(context) {
            this.$document = jquery_1["default"](document);
            this.$statusbar = context.layoutInfo.statusbar;
            this.$editable = context.layoutInfo.editable;
            this.options = context.options;
        }
        Statusbar.prototype.initialize = function () {
            var _this = this;
            Iif (this.options.airMode || this.options.disableResizeEditor) {
                this.destroy();
                return;
            }
            this.$statusbar.on('mousedown', function (event) {
                event.preventDefault();
                event.stopPropagation();
                var editableTop = _this.$editable.offset().top - _this.$document.scrollTop();
                var onMouseMove = function (event) {
                    var height = event.clientY - (editableTop + EDITABLE_PADDING);
                    height = (_this.options.minheight > 0) ? Math.max(height, _this.options.minheight) : height;
                    height = (_this.options.maxHeight > 0) ? Math.min(height, _this.options.maxHeight) : height;
                    _this.$editable.height(height);
                };
                _this.$document.on('mousemove', onMouseMove).one('mouseup', function () {
                    _this.$document.off('mousemove', onMouseMove);
                });
            });
        };
        Statusbar.prototype.destroy = function () {
            this.$statusbar.off();
            this.$statusbar.addClass('locked');
        };
        return Statusbar;
    }());
    exports["default"] = Statusbar;

    },'src/js/base/module/Statusbar.js',{"jquery":"/Users/lqez/Dev/summernote/node_modules/jquery/dist/jquery.js"}];})(this);
    //# sourceMappingURL=data:application/json;charset=utf-8;base64,