Default canvas-click pan and zoom settings? #2480
Unanswered
DevinSmithWork
asked this question in
Q&A
Replies: 1 comment 1 reply
-
So you want the normal behavior everywhere except where the button is? This codepen might be helpful: https://codepen.io/msalsbery/pen/dyOeXqO I think you're going to be better off leaving the existing behavior alone rather than trying to replicate it. That said, here's where panning is implemented: Line 3123 in 7dfc60a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm using an HTML button as an overlay, and need to have two separate workflows when a user (1) clicks on the button overlaying the canvas, and (2) clicks elsewhere on the canvas.
Presently, I'm using a handler for the canvas-click event and disabling the default action:
However, I would actually like to replicate the default pan/zoom action if (2) the user doesn't click the button. I'm wondering if these pan/zoom calculations are somewhere in the code I could reference?
Beta Was this translation helpful? Give feedback.
All reactions