ArcBees / gwtquery-elastic-plugin

GwtQuery Elastic plugin
11 stars 1 forks source link

min-height of elastic panel container 10px oversized #13

Open luxmar opened 9 years ago

luxmar commented 9 years ago

If you click on "Elastic" button on GwtQuery Elastic plugin exsample site: http://arcbees.github.io/gwtquery-elastic-plugin/ElasticBasicSample/ElasticLayoutSample.html, the "min-height" attribute for id="container" is 10px oversized. (Inspect it with Google Chrome dev tools and reduce 10px of min-height)

This is problematic because the min-height is set automatically. E.g. we use the ElasticHtmlPanel widget in our GWT project with a custom background pattern (defined in CSS). The bottom is always 10px oversized.

Maybe also provide an "onload"-event which notifies when rendering of the ElasticHtmlPanel has finished.

As workaround we use this (after 1 sec delay reduce 10px of min-height) in our project after the last tile in the panel was rendered successfully:

new Timer() {
        @Override
    public void run() {
       int height = elasticHtmlPanel.getOffsetHeight();
       elasticHtmlPanel.getElement().getStyle().setProperty("minHeight", height-10 + "px");
    }
}.schedule(1000);
christiangoudreau commented 9 years ago

Thanks for reporting! We'll look into this.