Skip to content

Commit

Permalink
Fix: listeners were not removed because of missed context (#7036)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnd0e authored Mar 20, 2020
1 parent e213469 commit 5902241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/handler/Map.TouchZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export var TouchZoom = Handler.extend({
this._zooming = false;
Util.cancelAnimFrame(this._animRequest);

DomEvent.off(document, 'touchmove', this._onTouchMove);
DomEvent.off(document, 'touchend', this._onTouchEnd);
DomEvent.off(document, 'touchmove', this._onTouchMove, this);
DomEvent.off(document, 'touchend', this._onTouchEnd, this);

// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.
if (this._map.options.zoomAnimation) {
Expand Down

0 comments on commit 5902241

Please sign in to comment.