PDA

View Full Version : [OPEN] [EXTJSIV-1970] [4.0.0][BUG] Incorrect cell placement in table layout



kyrandia
17 May 2011, 2:30 AM
There is a rowspan bug in table layout. For the following layout figure, cell D will be misplaced in (row,col)=(1,3).


0 1 2 3
+---+---+---+
0 | A | |
+---+ B |
1 | C | |
+---+---+---+
2 | D | E | F |
+---+---+---+


Patch is as follows.


ext4/src/layout/container/Table.js
@@ -239,8 +239,10 @@
});

// Increment
- rowspans[colIdx] = item.rowspan || 1;
- colIdx += item.colspan || 1;
+ for (j = item.colspan || 1; j > 0; j--) {
+ rowspans[colIdx] = item.rowspan || 1;
+ colIdx++;
+ }
cellIdx++;
}

aconran
17 May 2011, 3:08 PM
Thanks for the bug report and patch. We will review this.

dongryphon
24 May 2011, 9:32 PM
Patch is spot on. Thanks!

Fix should be in 4.0.2