Skip to content

Commit

Permalink
Merge pull request #25 from retejs/doritosxxx-patch-1
Browse files Browse the repository at this point in the history
fix: memory leak
  • Loading branch information
Ni55aN authored Oct 12, 2024
2 parents 148ac5d + da13ae5 commit 35f4a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export class Zoom {

window.addEventListener('pointermove', this.move)
window.addEventListener('pointerup', this.up)
window.addEventListener('contextmenu', this.contextmenu)
window.addEventListener('pointercancel', this.up)
window.addEventListener('contextmenu', this.contextmenu)
}

protected wheel = (e: WheelEvent) => {
Expand Down Expand Up @@ -117,5 +117,6 @@ export class Zoom {
window.removeEventListener('pointermove', this.move)
window.removeEventListener('pointerup', this.up)
window.removeEventListener('pointercancel', this.up)
window.removeEventListener('contextmenu', this.contextmenu)
}
}

0 comments on commit 35f4a8b

Please sign in to comment.