src/modules/navigation-model/index.js
function handleRowColSelectionChange(rowOrCol) {
        var decoratorsField = ('_' + rowOrCol + 'SelectionClasses');
        model[decoratorsField].forEach(function (selectionDecorator) {
            grid.cellClasses.remove(selectionDecorator);
        });
        model[decoratorsField] = [];

        if (grid[rowOrCol + 'Model'].allSelected()) {
            var top = rowOrCol === 'row' ? Infinity : 0;
            var left = rowOrCol === 'col' ? Infinity : 0;
            var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
            grid.cellClasses.add(decorator);
            model[decoratorsField].push(decorator);
        } else {
            grid[rowOrCol + 'Model'].getSelected().forEach(function (index) {
                var virtualIndex = grid[rowOrCol + 'Model'].toVirtual(index);
                var top = rowOrCol === 'row' ? virtualIndex : 0;
                var left = rowOrCol === 'col' ? virtualIndex : 0;
                var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
                grid.cellClasses.add(decorator);
                model[decoratorsField].push(decorator);
            });
        }
    }
function handleRowColSelectionChange(rowOrCol) {
        var decoratorsField = ('_' + rowOrCol + 'SelectionClasses');
        model[decoratorsField].forEach(function (selectionDecorator) {
            grid.cellClasses.remove(selectionDecorator);
        });
        model[decoratorsField] = [];

        if (grid[rowOrCol + 'Model'].allSelected()) {
            var top = rowOrCol === 'row' ? Infinity : 0;
            var left = rowOrCol === 'col' ? Infinity : 0;
            var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
            grid.cellClasses.add(decorator);
            model[decoratorsField].push(decorator);
        } else {
            grid[rowOrCol + 'Model'].getSelected().forEach(function (index) {
                var virtualIndex = grid[rowOrCol + 'Model'].toVirtual(index);
                var top = rowOrCol === 'row' ? virtualIndex : 0;
                var left = rowOrCol === 'col' ? virtualIndex : 0;
                var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
                grid.cellClasses.add(decorator);
                model[decoratorsField].push(decorator);
            });
        }
    }
function handleRowColSelectionChange ( rowOrCol ) { var decoratorsField = ( '_' + rowOrCol + 'SelectionClasses' ) ; model [ decoratorsField ] . forEach ( function ( selectionDecorator ) { grid . cellClasses . remove ( selectionDecorator ) ; } ) ; model [ decoratorsField ] = [ ] ; if ( grid [ rowOrCol + 'Model' ] . allSelected ( ) ) { var top = rowOrCol === 'row' ? Infinity : 0 ; var left = rowOrCol === 'col' ? Infinity : 0 ; var decorator = grid . cellClasses . create ( top , left , 'selected' , 1 , 1 , 'virtual' ) ; grid . cellClasses . add ( decorator ) ; model [ decoratorsField ] . push ( decorator ) ; } else { grid [ rowOrCol + 'Model' ] . getSelected ( ) . forEach ( function ( index ) { var virtualIndex = grid [ rowOrCol + 'Model' ] . toVirtual ( index ) ; var top = rowOrCol === 'row' ? virtualIndex : 0 ; var left = rowOrCol === 'col' ? virtualIndex : 0 ; var decorator = grid . cellClasses . create ( top , left , 'selected' , 1 , 1 , 'virtual' ) ; grid . cellClasses . add ( decorator ) ; model [ decoratorsField ] . push ( decorator ) ; } ) ; } }
row col selection
row col selection