From ab6d362616244147bec1f1831e2ad59ae48b00a4 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 4 Feb 2014 22:37:39 +0100 Subject: [PATCH] Adds possibility to automatically fire "dragend" event when moving marker --- wcfsetup/install/files/js/WCF.Location.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Location.js b/wcfsetup/install/files/js/WCF.Location.js index 27230e8587..a81ba2082b 100644 --- a/wcfsetup/install/files/js/WCF.Location.js +++ b/wcfsetup/install/files/js/WCF.Location.js @@ -584,9 +584,14 @@ WCF.Location.GoogleMaps.Util = { * @param google.maps.Marker marker * @param float latitude * @param float longitude + * @param boolean dragend indicates if "dragend" event is fired */ - moveMarker: function(marker, latitude, longitude) { + moveMarker: function(marker, latitude, longitude, triggerDragend) { marker.setPosition(new google.maps.LatLng(latitude, longitude)); + + if (triggerDragend) { + google.maps.event.trigger(marker, 'dragend'); + } }, /** -- 2.20.1