Skip to content

Commit b5e6a33

Browse files
committed
Merge remote-tracking branch 'ChristianHoesel/feature/draggable-marker' into develop
2 parents 2f8db6e + bbe5f90 commit b5e6a33

File tree

2 files changed

+18
-1
lines changed
  • vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo
  • vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui

2 files changed

+18
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public ComplexDemo()
105105
final LMarker markerInfo = new LMarker(
106106
this.reg,
107107
new LLatLng(this.reg, 49.674662, 12.162869),
108-
new LMarkerOptions().withIcon(divIconInfo));
108+
new LMarkerOptions().withIcon(divIconInfo).withDraggable(true));
109109

110110
@SuppressWarnings("checkstyle:LineLength")
111111
final LIcon iconXDEV = new LIcon(this.reg, new LIconOptions()

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/ui/LMarkerOptions.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class LMarkerOptions extends LInteractiveLayerOptions<LMarkerOptions>
3535
private Double riseOffset;
3636
private String shadowPane;
3737
private Boolean autoPanFocus;
38+
private Boolean draggable;
3839

3940
public LIcon getIcon()
4041
{
@@ -195,4 +196,20 @@ public LMarkerOptions withAutoPanFocus(final Boolean autoPanFocus)
195196
this.setAutoPanFocus(autoPanFocus);
196197
return this.self();
197198
}
199+
200+
public Boolean getDraggable()
201+
{
202+
return this.draggable;
203+
}
204+
205+
public void setDraggable(final Boolean draggable)
206+
{
207+
this.draggable = draggable;
208+
}
209+
210+
public LMarkerOptions withDraggable(final Boolean draggable)
211+
{
212+
this.setDraggable(draggable);
213+
return this.self();
214+
}
198215
}

0 commit comments

Comments
 (0)