all files / actions/ virtual-scroll.js

100% Statements 23/23
100% Branches 2/2
100% Functions 7/7
100% Lines 23/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   38× 38×   27959×   38× 38×   92× 92× 92× 92× 90×       92×          
define(["require", "exports", "@syncfusion/ej2-treegrid"], function (require, exports, ej2_treegrid_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var VirtualScroll = (function () {
        function VirtualScroll(parent) {
            this.parent = parent;
            this.bindTreeGridProperties();
        }
        VirtualScroll.prototype.getModuleName = function () {
            return 'virtualScroll';
        };
        VirtualScroll.prototype.bindTreeGridProperties = function () {
            this.parent.treeGrid.enableVirtualization = this.parent.enableVirtualization;
            ej2_treegrid_1.TreeGrid.Inject(ej2_treegrid_1.VirtualScroll);
        };
        VirtualScroll.prototype.getTopPosition = function () {
            var virtualTable = this.parent.ganttChartModule.scrollElement.querySelector('.e-virtualtable');
            var translates = virtualTable.style.transform.split(',');
            var top;
            if (translates.length > 1) {
                top = translates[1].trim().split(')')[0];
            }
            else {
                var transformString = virtualTable.style.transform;
                top = transformString.substring(transformString.lastIndexOf('(') + 1, transformString.lastIndexOf(')'));
            }
            return parseFloat(top);
        };
        VirtualScroll.prototype.destroy = function () {
        };
        return VirtualScroll;
    }());
    exports.VirtualScroll = VirtualScroll;
});