Parcourir la source

Rename 'ondragend' function.

opi il y a 10 ans
Parent
commit
ef7c2f145f
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      assets/main.js

+ 3 - 3
assets/main.js

@@ -20,12 +20,12 @@ $( document ).ready(function() {
     }).addTo(map);
 
     // every time the marker is dragged, update the coordinates container
-    marker.on('dragend', ondragend);
+    marker.on('dragend', mapUpdateCoords);
 
     // Set the initial marker coordinate on load.
-    ondragend();
+    mapUpdateCoords();
 
-    function ondragend() {
+    function mapUpdateCoords() {
         var m = marker.getLatLng();
         $('#latitude').val(m.lat);
         $('#longitude').val(m.lng);