Skip to content

Commit

Permalink
Fix column resize handle logic (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
davvidbaker authored Jun 22, 2023
1 parent b6054a0 commit 059768e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/columnresizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ export function handleDecorations(
const col = map.colCount($cell.pos - start) + $cell.nodeAfter!.attrs.colspan;
for (let row = 0; row < map.height; row++) {
const index = col + row * map.width - 1;
// For positions that are have either a different cell or the end
// For positions that have either a different cell or the end
// of the table to their right, and either the top of the table or
// a different cell above them, add a decoration
if (
(col == map.width || map.map[index] != map.map[index + 1]) &&
(row == 0 || map.map[index - 1] != map.map[index - 1 - map.width])
(row == 0 || map.map[index] != map.map[index - map.width])
) {
const cellPos = map.map[index];
const pos = start + cellPos + table.nodeAt(cellPos)!.nodeSize - 1;
Expand Down

0 comments on commit 059768e

Please sign in to comment.