Skip to content

Commit

Permalink
fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe committed May 15, 2019
1 parent 83304c2 commit d6e5ca5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/plugin/leaflet.canvas-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ function layerFactory(L) {
this._destroyContainer();
}, // TODO: this is temporary fix to keep container on remove
onRemove: function () {
this._map.off('viewreset', this._reset, this);
this._map.off('zoom moveend', this._redraw, this);
this._map.off('moveend', this._redraw, this); // TODO: 'moveend' seems enough (https://github.com/IITC-CE/Leaflet.Canvas-Markers/issues/11)
this._map.off('mousemove', this._onMouseMove, this);
this._map.off('click', this._onClick, this);
this._map.off('mouseout', this._handleMouseOut, this);
Expand All @@ -56,7 +55,7 @@ function layerFactory(L) {
_initContainer: function () {
var container = this._container = this._container || document.createElement('canvas'); // TODO: this is temporary fix to keep container on remove

this._map.on('zoom moveend viewreset', this._redraw, this);
this._map.on('moveend', this._redraw, this); // TODO: 'moveend' seems enough (https://github.com/IITC-CE/Leaflet.Canvas-Markers/issues/11)
this._map.on('mousemove', this._onMouseMove, this);
this._map.on('click', this._onClick, this);
this._map.on('mouseout', this._handleMouseOut, this);
Expand Down Expand Up @@ -118,7 +117,7 @@ function layerFactory(L) {
delete this._markers;
delete this._latlngMarkers;
delete this._ctx;
this._map.off('zoom moveend viewreset', this._redraw, this); // todo: port to layers-features-back branch
this._map.off('moveend', this._redraw, this); // TODO: 'moveend' seems enough (https://github.com/IITC-CE/Leaflet.Canvas-Markers/issues/11)
this._map.off('mousemove', this._onMouseMove, this);
this._map.off('click', this._onClick, this);
this._map.off('mouseout', this._handleMouseOut, this);
Expand Down

0 comments on commit d6e5ca5

Please sign in to comment.