Skip to content

Commit

Permalink
implement cancel to clear memory leak, see #1356
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Mar 28, 2022
1 parent 1445110 commit 6d4ecc6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/listeners/AnimatedPanZoomListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ class AnimatedPanZoomListener extends PanZoomListener {
}

/**
* Interrupt the listener.
* Interrupt the listener. Cancels any active input and clears references upon interaction end.
* @public
*/
interrupt() {
Expand All @@ -810,6 +810,14 @@ class AnimatedPanZoomListener extends PanZoomListener {
super.interrupt();
}

/**
* "Cancel" the listener, when input stops abnormally. Part of the scenery Input API.
* @public
*/
cancel() {
this.interrupt();
}

/**
* Returns true if the Intent of the Pointer indicates that it will be used for dragging of some kind.
* @private
Expand Down

0 comments on commit 6d4ecc6

Please sign in to comment.