Skip to content

Commit 41ae6d3

Browse files
committed
Update MinimalisticDemo.java
1 parent 334f2e1 commit 41ae6d3

File tree

1 file changed

+5
-2
lines changed
  • vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo

1 file changed

+5
-2
lines changed

vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/MinimalisticDemo.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ public class MinimalisticDemo extends VerticalLayout
1919

2020
public MinimalisticDemo()
2121
{
22+
// Let the view use 100% of the site
23+
this.setSizeFull();
24+
2225
// Create the registry which is needed so that components can be reused and their methods invoked
26+
// Note: You normally don't need to invoke any methods of the registry and just hand it over to the components
2327
final LComponentManagementRegistry reg = new LDefaultComponentManagementRegistry(this);
2428

2529
// Create and add the MapContainer (which contains the map) to the UI
2630
final MapContainer mapContainer = new MapContainer(reg);
2731
mapContainer.setSizeFull();
2832
this.add(mapContainer);
29-
this.setSizeFull();
3033

3134
final LMap map = mapContainer.getlMap();
3235

@@ -40,7 +43,7 @@ public MinimalisticDemo()
4043
new LMarker(reg, new LLatLng(reg, 49.6756, 12.1610))
4144
// Bind a popup which is displayed when clicking the marker
4245
.bindPopup("XDEV Software")
43-
// Add a component to the map
46+
// Add it to the map
4447
.addTo(map);
4548
}
4649
}

0 commit comments

Comments
 (0)