tltv / gantt

Gantt Chart Add-on for Vaadin 8
Apache License 2.0
20 stars 23 forks source link

Undefined height vs add step #55

Closed tistvan closed 7 years ago

tistvan commented 7 years ago

When the gantt's height is undefined and I add a step to the gantt from a listener, the component doesn't grow. You can reproduce the bug by commenting out gantt.setHeight(500, Unit.PIXELS); line in DemoUI and add adding a step from the menu. Can you suggest me a workaround for this issue (if exists)? Can I force height update somehow?

Thanks

tistvan commented 7 years ago

If I comment out the following lines in GantWidget.notifyHeightChanged the bug disappears:

container.getStyle().setHeight(
                    height - getTimelineHeight()
                            - getHorizontalScrollbarSpacerHeight(), Unit.PX);
tltv commented 7 years ago

Pull request merged. Seems to work. Thanks for the patch tistvan!