Browse Source

only setting maxHeight of OverlayPanel relative to mapPanel height

master
Francesco Mangiacrapa 2 months ago
parent
commit
8f6a140481
  1. 16
      src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/GeonaDataViewMainPanel.java

16
src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/GeonaDataViewMainPanel.java

@ -21,7 +21,6 @@ import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
@ -147,6 +146,16 @@ public class GeonaDataViewMainPanel extends Composite {
String toH = height + "px";
mapPanel.setMapHeight(height);
detailsPanel.setHeight(toH);
setOverlayPanelMaxHeight();
}
private void setOverlayPanelMaxHeight() {
String overlMH = mapPanel.getOffsetHeight()-130+"px";
GWT.log("overlayLayersPanel maxHeight: "+overlMH);
overlayLayersPanel.getElement().getStyle().setProperty("maxHeight", overlMH);
}
/**
@ -280,9 +289,8 @@ public class GeonaDataViewMainPanel extends Composite {
//layersDDB.setVisible(true);
overlayLayersPanel.setVisible(true);
overlayLayersPanel.clear();
int height = Window.getClientHeight() * 87 / 100;
panel.getElement().getStyle().setProperty("maxHeight", height+"px");
//panel.getElement().getStyle().setProperty("maxHeight", height+"px");
setOverlayPanelMaxHeight();
overlayLayersPanel.add(panel);
//layersDDBClickEvent();
}

Loading…
Cancel
Save