From: Matthias Schmidt Date: Tue, 4 Feb 2014 21:37:39 +0000 (+0100) Subject: Adds possibility to automatically fire "dragend" event when moving marker X-Git-Tag: 2.0.3~56^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab6d362616244147bec1f1831e2ad59ae48b00a4;p=GitHub%2FWoltLab%2FWCF.git Adds possibility to automatically fire "dragend" event when moving marker --- 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'); + } }, /**