chartjs / chartjs-plugin-zoom

Zoom and pan plugin for Chart.js
MIT License
579 stars 322 forks source link

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

Open kolkonos opened 2 weeks ago

kolkonos commented 2 weeks 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});