summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-06-02 00:07:06 +0300
committerVaadin Code Review <review@vaadin.com>2015-06-05 22:14:42 +0000
commit220b407724791d7483f21d6a27d9957beee5a843 (patch)
treef1074cd5b93112c31d9772fe631b275fbf8a2d8f /client
parentd5381626ec2e058ac7fb31c4af789b248df92669 (diff)
downloadvaadin-framework-220b407724791d7483f21d6a27d9957beee5a843.tar.gz
vaadin-framework-220b407724791d7483f21d6a27d9957beee5a843.zip
Insert columns using correct logical row index (#18103)
Change-Id: I7010f4ca938e29c0b348aac15581c0aeb48d2dc0
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Escalator.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java
index bb497e7e13..55462d18fe 100644
--- a/client/src/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/com/vaadin/client/widgets/Escalator.java
@@ -1645,7 +1645,8 @@ public class Escalator extends Widget implements RequiresResize,
for (int row = 0; row < getDomRowCount(); row++) {
final TableRowElement tr = getTrByVisualIndex(row);
- paintInsertCells(tr, row, offset, numberOfColumns);
+ int logicalRowIndex = getLogicalRowIndex(tr);
+ paintInsertCells(tr, logicalRowIndex, offset, numberOfColumns);
}
reapplyRowWidths();
@@ -2127,6 +2128,11 @@ public class Escalator extends Widget implements RequiresResize,
* @return the height of this table section
*/
protected abstract double getHeightOfSection();
+
+ protected int getLogicalRowIndex(final TableRowElement tr) {
+ return tr.getSectionRowIndex();
+ };
+
}
private abstract class AbstractStaticRowContainer extends
@@ -3396,7 +3402,8 @@ public class Escalator extends Widget implements RequiresResize,
}
}
- private int getLogicalRowIndex(final Element tr) {
+ @Override
+ protected int getLogicalRowIndex(final TableRowElement tr) {
assert tr.getParentNode() == root : "The given element isn't a row element in the body";
int internalIndex = visualRowOrder.indexOf(tr);
return getTopRowLogicalIndex() + internalIndex;
@@ -3854,7 +3861,8 @@ public class Escalator extends Widget implements RequiresResize,
}
// Convert DOM coordinates to logical coordinates for rows
- Element rowElement = cell.getElement().getParentElement();
+ TableRowElement rowElement = (TableRowElement) cell.getElement()
+ .getParentElement();
return new Cell(getLogicalRowIndex(rowElement), cell.getColumn(),
cell.getElement());
}