-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resetzoom triggering after drag (beta) #441
Comments
Thanks for the heads up, I'm guessing it should not call "onClick" when dragging. |
@kurkle I think it's the native behavior to have @pgp80 There are some tricks to distinguish quick click and "drag" events: https://stackoverflow.com/questions/6042202/how-to-distinguish-mouse-click-and-drag. |
I've been trying the latest betas and the drag still appears to be triggering the onClick: resetZoom on my end. I suppose I can try the tricks per the above, but just figured I'd let you know in case this still isn't intended behavior, thanks! |
@pgp80 is your click handler on the chart options or in the canvas element? NVM, just verified it is only filtered out when panning, but not when drag zooming. |
I'm trying out the betas of both chartjs and zoom, and I'm noticing some behavior which is different from the current versions I have on a project. I have drag zoom enabled and in the current version, it zooms and then I have onClick: resetZoom and it reverts to original form. In the beta, I drag and as soon as I release the mouse the resetZoom occurs immediately (so it doesn't stay zoomed in). Removing the onClick in the beta does result in a stable zooming. Just thought I'd share!
``
options: {
}//end options
The text was updated successfully, but these errors were encountered: