jCanvaScript icon indicating copy to clipboard operation
jCanvaScript copied to clipboard

Canvas inside scrollable div

Open r0b- opened this issue 13 years ago • 2 comments

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

r0b- avatar May 25 '12 09:05 r0b-

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.

apsavin avatar May 27 '12 08:05 apsavin

In first, sorry about sideway comment. I used recalculateOffiset() function in my program, and it works good without any bugs.

thanks.

amaduki avatar Aug 04 '12 05:08 amaduki