Improved Overlay Custom Layer Panel and CSS

This commit is contained in:
Francesco Mangiacrapa 2023-05-15 17:11:37 +02:00
parent 7dc1343f1b
commit f86988f8c7
3 changed files with 32 additions and 3 deletions

View File

@ -56,6 +56,7 @@ import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
@ -644,6 +645,12 @@ public class GeonaDataViewMainPanel extends Composite {
: gCustomLayerDV.getName();
labelGroup.setTitle(descr);
panelCustomOverlayLayers.add(labelGroup);
if(descr.compareTo(gCustomLayerDV.getName())!=0) {
HTML overlayGroupDescr = new HTML();
overlayGroupDescr.getElement().setClassName("overlay-panel-style-description");
overlayGroupDescr.setHTML(descr);
panelCustomOverlayLayers.add(overlayGroupDescr);
}
for (CustomLayerDV customLayer : gCustomLayerDV.getListCustomLayers()) {
if(customLayer.isDisplay()) {

View File

@ -61,8 +61,8 @@
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK" visible="false"
title="Custom overlay layers.." text="Overlays" ui:field="linkCustomOverlayLayers" icon="REORDER">
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="open-collection-style">
title="Custom overlay layers.." text="Overlay" ui:field="linkCustomOverlayLayers" icon="REORDER">
<g:HTMLPanel ui:field="panelCustomOverlayLayers" addStyleNames="overlay-panel-style">
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK" text="Search"

View File

@ -824,4 +824,26 @@ RESPONSIVE
.layer-style-panel-table-legend table td {
padding-left: 5px;
}
}
/* CUSTOM OVERLAY UI */
.overlay-panel-style {
padding-left: 10px;
padding-right: 10px;
max-width: 350px;
}
.overlay-panel-style-description {
border: none !important;
white-space: pre-line;
}
.overlay-panel-style > div {
border: 1px solid #ccc;
border-radius: 5px;
padding: 10px;
margin-bottom: 10px;
margin-top: 5px;
}