all files / grid/actions/ freeze.js

100% Statements 25/25
100% Branches 4/4
100% Functions 8/8
100% Lines 25/25
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   135× 135× 135×   20704×   136×   135× 135×   135×   262× 132×   130× 130×   262×        
define(["require", "exports", "../base/constant"], function (require, exports, events) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Freeze = (function () {
        function Freeze(parent, locator) {
            this.parent = parent;
            this.locator = locator;
            this.addEventListener();
        }
        Freeze.prototype.getModuleName = function () {
            return 'freeze';
        };
        Freeze.prototype.addEventListener = function () {
            if (this.parent.isDestroyed) {
                return;
            }
            this.parent.on(events.initialLoad, this.instantiateRenderer, this);
            this.parent.on(events.destroy, this.destroy, this);
        };
        Freeze.prototype.instantiateRenderer = function () {
            this.parent.log('limitation', this.getModuleName());
        };
        Freeze.prototype.removeEventListener = function () {
            if (this.parent.isDestroyed) {
                return;
            }
            this.parent.off(events.initialLoad, this.instantiateRenderer);
            this.parent.off(events.destroy, this.destroy);
        };
        Freeze.prototype.destroy = function () {
            this.removeEventListener();
        };
        return Freeze;
    }());
    exports.Freeze = Freeze;
});