vaadin / touchkit

TouchKit is a library of mobile components for Vaadin Framework
https://vaadin.com/touchkit
Other
11 stars 25 forks source link

VNavigationManager doesn't work when orientation is changed #422

Open vaadin-bot opened 8 years ago

vaadin-bot commented 8 years ago

Originally by @pontusbostrom


The VNavigationManager draws components at an offset from the parent. These offsets seem not to be updated properly (or at all) when the orientation is changed. As a result the current view is not drawn properly starting from the top-left corner, but starting from some offset. As a work around, I used a resizeHandler that does:

            Widget p = navigationManager.getPreviousView();
            Widget n = navigationManager.getNextView();
            navigationManager.setPreviousWidget(null);
            navigationManager.setNextWidget(null);
            navigationManager.setCurrentView(currentView);
            navigationManager.resetPositionsAndChildSizes();
            navigationManager.setPreviousWidget(p);
            navigationManager.setNextWidget(n); 

This works but it is a bit cumbersome.


Imported from https://dev.vaadin.com/ issue #20389