Skip to content

Commit

Permalink
fix(table): make cell merge using right x/y coordinates
Browse files Browse the repository at this point in the history
fix #1352
  • Loading branch information
Alex-D committed Feb 22, 2023
1 parent 24c6d99 commit 08f8c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/table/trumbowyg.table.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@
var firstCellState = tableSelectedCells[0];
var firstSelectedCellTag = tableState[firstCellState[0]][firstCellState[1]].tag;
var allTagsAreTheSame = tableSelectedCells.every(function (value) {
var cellState = tableState[value[1]][value[0]];
var cellState = tableState[value[0]][value[1]];
if (cellState.mergedIn !== undefined) {
cellState = tableState[cellState.mergedIn[1]][cellState.mergedIn[0]];
cellState = tableState[cellState.mergedIn[0]][cellState.mergedIn[1]];
}

return cellState.tag === firstSelectedCellTag;
Expand Down

0 comments on commit 08f8c6f

Please sign in to comment.