From 3bebf3cd1a0613c6f15da82f60984e565f1f82e5 Mon Sep 17 00:00:00 2001 From: Paola De Bartolo Date: Mon, 23 Oct 2023 12:55:35 -0300 Subject: [PATCH] fix: update markers on removal Update web-component dependency to 3.6.1 Close #109 --- .../com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java | 4 +++- .../flowingcode/vaadin/addons/googlemaps/GoogleMapMarker.java | 2 +- .../flowingcode/vaadin/addons/googlemaps/GoogleMapPoint.java | 2 +- .../vaadin/addons/googlemaps/GoogleMapPolygon.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java index 9b6c659..75eb250 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java +++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java @@ -44,7 +44,7 @@ @SuppressWarnings("serial") @Tag("google-map") @JsModule("@flowingcode/google-map/google-map.js") -@NpmPackage(value = "@flowingcode/google-map", version = "3.6.0") +@NpmPackage(value = "@flowingcode/google-map", version = "3.6.1") @NpmPackage(value = "@googlemaps/markerclusterer", version = "2.0.8") @JsModule("./googlemaps/geolocation.js") public class GoogleMap extends Component implements HasSize { @@ -176,6 +176,8 @@ public void addMarker(GoogleMapMarker marker) { @SuppressWarnings("squid:S3242") public void removeMarker(GoogleMapMarker marker) { this.getElement().removeChild(marker.getElement()); + // markers need to be updated on removal + this.getElement().executeJs("this._updateMarkers()"); } /** diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapMarker.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapMarker.java index e149e1a..368fd41 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapMarker.java +++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapMarker.java @@ -39,7 +39,7 @@ @SuppressWarnings("serial") @Tag("google-map-marker") @JsModule("@flowingcode/google-map/google-map-marker.js") -@NpmPackage(value = "@flowingcode/google-map", version = "3.6.0") +@NpmPackage(value = "@flowingcode/google-map", version = "3.6.1") @NpmPackage(value = "@googlemaps/markerclusterer", version = "2.0.8") public class GoogleMapMarker extends Component { diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoint.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoint.java index 45db8c8..0cb1b4b 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoint.java +++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoint.java @@ -28,7 +28,7 @@ @SuppressWarnings("serial") @Tag("google-map-point") @JsModule("@flowingcode/google-map/google-map-point.js") -@NpmPackage(value = "@flowingcode/google-map", version = "3.6.0") +@NpmPackage(value = "@flowingcode/google-map", version = "3.6.1") @NpmPackage(value = "@googlemaps/markerclusterer", version = "2.0.8") public class GoogleMapPoint extends Component { diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPolygon.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPolygon.java index be2d35c..f96c64b 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPolygon.java +++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPolygon.java @@ -40,7 +40,7 @@ @Tag("google-map-poly") @JsModule("@flowingcode/google-map/google-map-poly.js") @JsModule("@flowingcode/google-map/google-map-point.js") -@NpmPackage(value = "@flowingcode/google-map", version = "3.6.0") +@NpmPackage(value = "@flowingcode/google-map", version = "3.6.1") @NpmPackage(value = "@googlemaps/markerclusterer", version = "2.0.8") public class GoogleMapPolygon extends Component {