Leaflet/Leaflet.draw — pull request #112 by koppelbakje (2013-03-25 11:53:05+00:00)
Title: Remove Marker events in the latest leaflet build by passing its context

Since Leaflet/Leaflet@a1acaffdf1e0f0598932c559b13473e892d8544b there are two more conditions in the removeEventListener function. When the contextId is undefined the events won't be removed. It should be solved by passing the marker its context to the off calls in the removeHooks.

```javascript
removeHooks: function () {
L.Draw.Feature.prototype.removeHooks.call(this);

if (this._map) {
if (this._marker) {
this._marker.off('click', this._onClick, this);
this._map
.off('click', this._onClick, this)
.removeLayer(this._marker);
delete this._marker;
}

this._mouseMarker.off('click', this._onClick, this);
this._map.removeLayer(this._mouseMarker);
delete this._mouseMarker;

this._map.off('mousemove', this._onMouseMove, this);
}
}
```