jCanvaScript
jCanvaScript copied to clipboard
Canvas inside scrollable div
Hi,
if the canvas is inside a div that can be scrolled the mouse position is no longer correct. I think it can be solved with the solution posted in http://stackoverflow.com/questions/4962710/get-mouse-position-in-scrollable-div but I can't see how to inject the mouse position by myself?
Thanks in advance
try to get the latest release from github (https://github.com/apsavin/jCanvaScript/blob/master/compile/jCanvaScript.1.5.18.js) and call recalculateOffset() canvas method on scroll event of div.
In first, sorry about sideway comment. I used recalculateOffiset() function in my program, and it works good without any bugs.
thanks.