Skip to content

Commit

Permalink
Merge 735f1ac into b1823f5
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist committed Dec 11, 2019
2 parents b1823f5 + 735f1ac commit 12a54ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/controllers/queryRunner.ts
Expand Up @@ -415,9 +415,18 @@ export default class QueryRunner {
for (let rowId of allRowIds) {
let row = rowIdToRowMap.get(rowId);
const rowSelections = rowIdToSelectionMap.get(rowId);

// sort selections by column
rowSelections.sort((a, b) => {
return ((a.fromCell < b.fromCell) ? -1 : (a.fromCell > b.fromCell) ? 1 : 0);
});

// start copy paste from left-most column
const firstColumn = rowSelections[0].fromCell;

for (let i = 0; i < rowSelections.length; i++) {
let rowSelection = rowSelections[i];
for (let j = 0; j < rowSelection.fromCell; j++) {
for (let j = firstColumn; j < rowSelection.fromCell; j++) {
copyString += ' \t';
}
let cellObjects = row.slice(rowSelection.fromCell, (rowSelection.toCell + 1));
Expand Down

0 comments on commit 12a54ac

Please sign in to comment.