You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You calculate local coordinates there based on evt.pageX/evt.pageY and canvas page bounds. Element page bounds variable gets updated on "resize" page event(and manual "resize" calls), but page layout may be changed all the time(some data is loaded and element above chart became bigger for example).
Easiest fix is to use evt.offsetX/evt.offsetY, but this also highlight problem with "bounds" variable, better not to use it if possible since there is no performant tracker of element position.
The text was updated successfully, but these errors were encountered:
You're right that it's not ideal as it'll take some manual calculations for advanced layout changes. I think I encountered some issue with offsetX/offsetY (maybe it's not supported by touch event, or some other issues).
You calculate local coordinates there based on evt.pageX/evt.pageY and canvas page bounds. Element page bounds variable gets updated on "resize" page event(and manual "resize" calls), but page layout may be changed all the time(some data is loaded and element above chart became bigger for example).
Easiest fix is to use evt.offsetX/evt.offsetY, but this also highlight problem with "bounds" variable, better not to use it if possible since there is no performant tracker of element position.
The text was updated successfully, but these errors were encountered: