chartjs / chartjs-plugin-zoom

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

fix: trigger `onZoomStart` from `pinchStart` #810

Open ZaLiTHkA opened 3 months ago

ZaLiTHkA commented 3 months ago

this simply ensures that the custom onZoomStart handler is also executed when zooming is initiated with "pinch".

there seems to be a fair difference in the logic structure between the handlers.js and hammer.js files, so I tried to keep this in line with what I already saw in hammer.js directly.

I did not add any tests for this, though I feel like we probably should.. perhaps one of the repo maintainers could help determine where this test should go? I don't see any others that cover the "pinch" functionality specifically.

this follows on from PR #487, and fixes issues #631 and #790.