diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/widget/escalator/FlyweightCell.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/widgets/Escalator.java | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java b/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java index 031511115c..42fa245e59 100644 --- a/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java +++ b/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java @@ -108,7 +108,9 @@ public class FlyweightCell { + row.getRow() + " doesn't exist in the DOM!"; e.setPropertyInt(COLSPAN_ATTR, 1); - e.getStyle().setWidth(row.getColumnWidth(column), Unit.PX); + if (row.getColumnWidth(column) >= 0) { + e.getStyle().setWidth(row.getColumnWidth(column), Unit.PX); + } e.getStyle().clearDisplay(); setElement(e); } diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java index d598be61a4..a696906902 100644 --- a/client/src/com/vaadin/client/widgets/Escalator.java +++ b/client/src/com/vaadin/client/widgets/Escalator.java @@ -1556,8 +1556,12 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker final double colWidth) { final TableCellElement cellElem = TableCellElement.as(DOM .createElement(getCellElementTagName())); - cellElem.getStyle().setHeight(height, Unit.PX); - cellElem.getStyle().setWidth(colWidth, Unit.PX); + if (height >= 0) { + cellElem.getStyle().setHeight(height, Unit.PX); + } + if (colWidth >= 0) { + cellElem.getStyle().setWidth(colWidth, Unit.PX); + } cellElem.addClassName(getStylePrimaryName() + "-cell"); return cellElem; } @@ -1790,7 +1794,9 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker com.google.gwt.dom.client.Element row = root.getFirstChildElement(); while (row != null) { - row.getStyle().setWidth(rowWidth, Unit.PX); + if (rowWidth >= 0) { + row.getStyle().setWidth(rowWidth, Unit.PX); + } row = row.getNextSiblingElement(); } } |