Adds possibility to automatically fire "dragend" event when moving marker
authorMatthias Schmidt <gravatronics@live.com>
Tue, 4 Feb 2014 21:37:39 +0000 (22:37 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 4 Feb 2014 21:37:39 +0000 (22:37 +0100)
wcfsetup/install/files/js/WCF.Location.js

index 27230e85871195d5abab0bf3110d1976d44fd021..a81ba2082b43ca3bed441e175bf1e9ce2ef5e09c 100644 (file)
@@ -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');
+               }
        },
        
        /**