mstahv / diagram-builder

Vaadin Add-on built over ALLOYUI DiagramBuilder
Apache License 2.0
7 stars 11 forks source link

Doesnt work with Vaadin TabSheets #2

Closed pataiadam closed 9 years ago

pataiadam commented 10 years ago

Hi,

If i add diagramBuilder to a tabsheet (or accordion), the diagram appear on the top of the page. If I click to another tab and back to diagram tab, or if I repeat this 3-4 times, then I will see 4-5 diagrambuilder on the top of the page.

        /** Layout */
        VerticalLayout layout = new VerticalLayout();

        /*...*/
        /** Tabsheet */
        Accordion tabsheet = new Accordion();

        /** Tab  #1 - task table*/
        VerticalLayout overview = new VerticalLayout();
        taskTable = new Table();
        overview.addComponent(taskTable);
        /*...*/

        /** Tab  #2 - graphChart*/
        VerticalLayout graphChart = new VerticalLayout();
        diagramBuilder=new DiagramBuilder();
        graphChart.addComponent(diagramBuilder);
        diagramBuilder.setSizeFull();
            initDiagram(diagramBuilder);

            /**Add tabs to tabsheet*/
        tabsheet.addTab(graphChart, "Graph Chart");
        tabsheet.addTab(overview, "Overview");

        /**Add tabsheet to layout*/
        layout.addComponent(tabsheet);

diagram

Regards, Adam