Skip to content

Commit

Permalink
fix onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
kwibus committed Jun 16, 2017
1 parent a626a5e commit 89a0ace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Leaflet.EdgeMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},

onClick: function (e) {
this._map.setView(e.latlng, this._map.getZoom());
this._map.setView(e._target, this._map.getZoom());
},

_marker: undefined,
Expand Down Expand Up @@ -111,7 +111,7 @@
var latlng = this._map.containerPointToLatLng([x, y]);
if (typeof this._marker === 'undefined') {
this._marker = L.marker(latlng, this.options).addTo(this._map);
this._marker.on('click', this.onClick, this._marker);
this._marker.on('click', this.onClick, this);
}else {
this._marker.setLatLng(latlng);
}
Expand Down

0 comments on commit 89a0ace

Please sign in to comment.