Example #1
0
 ClipboardService.prototype.iterateFirstActiveRange = function (rowCallback, columnCallback) {
     if (this.rangeController.isEmpty()) {
         return;
     }
     var rangeSelections = this.rangeController.getCellRanges();
     // if more than one range selected, we take the first one only, we ignore the others,
     // in Excel, it doesn't allow multiple blocks to be copied to clipboard at same time
     var range = rangeSelections[0];
     // get starting and ending row, remember rowEnd could be before rowStart
     var startRow = range.start.getGridRow();
     var endRow = range.end.getGridRow();
     var startRowIsFirst = startRow.before(endRow);
     var currentRow = startRowIsFirst ? startRow : endRow;
     var lastRow = startRowIsFirst ? endRow : startRow;
     if (main_1.Utils.exists(columnCallback)) {
         columnCallback(range.columns);
     }
     while (true) {
         var rowNode = this.getRowNode(currentRow);
         rowCallback(currentRow, rowNode, range.columns);
         if (currentRow.equals(lastRow)) {
             break;
         }
         currentRow = this.cellNavigationService.getRowBelow(currentRow);
     }
 };
Example #2
0
 columns.forEach(function (column, index) {
     var value = _this.columnController.getDisplayNameForCol(column, true);
     if (index != 0) {
         data += '\t';
     }
     if (main_1.Utils.exists(value)) {
         data += value;
     }
 });
 RichSelectCellEditor.prototype.onMouseMove = function (mouseEvent) {
     var rect = this.virtualList.getGui().getBoundingClientRect();
     var scrollTop = this.virtualList.getScrollTop();
     var mouseY = mouseEvent.clientY - rect.top + scrollTop;
     var row = Math.floor(mouseY / this.virtualList.getRowHeight());
     var value = this.params.values[row];
     if (main_1.Utils.exists(value)) {
         this.setSelectedValue(value);
     }
 };
 AggregationStage.prototype.execute = function (rootNode) {
     // we don't do aggregation if user provided the groups
     var rowsAlreadyGrouped = main_1.Utils.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc());
     if (rowsAlreadyGrouped) {
         return;
     }
     var valueColumns = this.columnController.getValueColumns();
     var pivotColumns = this.columnController.getPivotColumns();
     this.recursivelyCreateAggData(rootNode, valueColumns, pivotColumns);
 };
Example #5
0
 columns.forEach(function (column, index) {
     var value = _this.valueService.getValue(column, rowNode);
     value = _this.processRangeCell(rowNode, column, value);
     if (index != 0) {
         data += '\t';
     }
     if (main_1.Utils.exists(value)) {
         data += value;
     }
     var cellId = new main_1.GridCell(currentRow.rowIndex, currentRow.floating, column).createId();
     cellsToFlash[cellId] = true;
 });
 RichSelectCellEditor.prototype.renderSelectedValue = function () {
     var eValue = this.getGui().querySelector('.ag-rich-select-value');
     if (this.cellRenderer) {
         var result = this.cellRendererService.useCellRenderer(this.cellRenderer, eValue, { value: this.selectedValue });
         if (result && result.destroy) {
             this.addDestroyFunc(function () { return result.destroy(); });
         }
     }
     else {
         if (main_1.Utils.exists(this.selectedValue)) {
             eValue.innerHTML = this.selectedValue.toString();
         }
         else {
             eValue.innerHTML = '';
         }
     }
 };