From 1b2116ea7ca53cd69c4309adf7d662e2ed7616f3 Mon Sep 17 00:00:00 2001 From: Tudor Pavel Date: Fri, 12 Feb 2016 18:26:58 +0200 Subject: [PATCH] Update richmarker.js to send marker as argument to 'dragend' callback Unless the marker object is sent as an argument in the callback, you can only use anonymous functions which have the marker in scope. --- src/richmarker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/richmarker.js b/src/richmarker.js index 2b4ef0c..8687c72 100755 --- a/src/richmarker.js +++ b/src/richmarker.js @@ -526,7 +526,7 @@ RichMarker.prototype.stopDrag = function() { this.removeDraggingListeners_(); this.setCursor_('draggable'); - google.maps.event.trigger(this, 'dragend'); + google.maps.event.trigger(this, 'dragend', this); this.draw(); }