chartjs / chartjs-plugin-zoom

Zoom and pan plugin for Chart.js
MIT License
598 stars 327 forks source link

Expose "passive" boolean in the EventListenerOptions dictionary. #819

Closed kolkonos closed 2 weeks ago

kolkonos commented 5 months ago

While using the plugin, the console receives many alerts/suggestions in chrome regarding passive event listeners, and how adding the option would improve scrolling and transitions.

Simple solution is to modify line 29 in the src/handlers.js

from: target.addEventListener(type, handlers[type]); to: target.addEventListener(type, handlers[type],{passive:true});