shaigem / BlazorPanzoom

Blazor wrapper for timmywil's panzoom library that helps make zooming and panning of Blazor components and elements easier
https://shaigem.github.io/BlazorPanzoom/
MIT License
47 stars 13 forks source link

Bound wheel listener doesn't get removed properly #5

Closed shaigem closed 3 years ago

shaigem commented 3 years ago

If there are multiple Panzoom controls that have a custom wheel listener on a single page, they won't get properly removed/disposed.

element.parentElement.addEventListener('wheel', this.boundWheelListener = this.wheelHandler.bind(this, dotnetReference))

The boundWheelListener should keep track of multiple listeners instead of just being set to the latest one.