fixed balloon

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer-app@113650 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-03-18 16:34:38 +00:00
parent ef6c359f30
commit ae06e74778
2 changed files with 5 additions and 19 deletions

View File

@ -187,21 +187,12 @@ public class ApplicationController implements WmsDialogHandler{
}
/**
* Sets the new position.
*
* @param scrollTop the scroll top
* @param left the left
* @param height the height
*
*/
public void setWMSBalloonPosition(int scrollTop, int left, int height){
// GWT.log("height: "+height +" scrollTop: "+scrollTop);
scrollTop= scrollTop>0?scrollTop:1;
height = height>0?height:1;
int newPosition = scrollTop+height;
// GWT.log("new position: "+newPosition);
public void moveWMSBalloonPosition(){
baloonWMS.hide();
baloonWMS.setVisible(false);
baloonWMS.show();
baloonWMS.setPopupPosition(left>0?left:1, newPosition-35);
baloonWMS.showRelativeTo(lcWMS);
baloonWMS.setVisible(true);
}

View File

@ -106,12 +106,7 @@ public class GisViewerApp implements EntryPoint {
appController.getMainPanel().setHeight(rootHeight);
appController.getMainPanel().setWidth(rootWidth);
appController.getBaloonWMS().hide();
int scroll = Window.getScrollTop();
int left = Window.getScrollLeft();
int height = Window.getClientHeight();
// GWT.log("onResize height: "+Window.getClientHeight());
appController.setWMSBalloonPosition(scroll, left, height);
appController.moveWMSBalloonPosition();
// appController.getGisViewerPanel().getOpenLayersMap().centerMapCurrentZoom();
}