all files / actions/ column-resize.js

100% Statements 27/27
75% Branches 3/4
100% Functions 9/9
100% Lines 27/27
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   441× 441× 441× 441×   54110×   441× 441×     441×   441×            
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'] = Object.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;
});