all files / actions/ column-resize.js

83.33% Statements 30/36
63.64% Branches 7/11
90.91% Functions 10/11
85.71% Lines 30/35
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                   309× 309× 309× 309×   27959×   309× 309×     309×   309×            
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
define(["require", "exports", "@syncfusion/ej2-treegrid"], function (require, exports, ej2_treegrid_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Resize = (function () {
        function Resize(gantt) {
            this.parent = gantt;
            ej2_treegrid_1.TreeGrid.Inject(ej2_treegrid_1.Resize);
            this.parent.treeGrid.allowResizing = this.parent.allowResizing;
            this.bindEvents();
        }
        Resize.prototype.getModuleName = function () {
            return 'resize';
        };
        Resize.prototype.bindEvents = function () {
            var _this = this;
            this.parent.treeGrid.resizeStart = function (args) {
                Eif (_this.parent.undoRedoModule && _this.parent['isUndoRedoItemPresent']('ColumnResize')) {
                    _this.parent.undoRedoModule['createUndoCollection']();
                    var details = {};
                    details['action'] = 'ColumnResize';
                    details['resizedColumn'] = __assign({}, args.column);
                    _this.parent.undoRedoModule['getUndoCollection'][_this.parent.undoRedoModule['getUndoCollection'].length - 1] = details;
                }
                _this.parent.trigger('resizeStart', args);
            };
            this.parent.treeGrid.resizing = function (args) {
                _this.parent.trigger('resizing', args);
            };
            this.parent.treeGrid.resizeStop = function (args) {
                _this.parent.trigger('resizeStop', args);
            };
        };
        Resize.prototype.destroy = function () {
        };
        return Resize;
    }());
    exports.Resize = Resize;
});