Skip to content
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

Canvas inside scrollable div #8

Open
r0b- opened this issue May 25, 2012 · 2 comments
Open

Canvas inside scrollable div #8

r0b- opened this issue May 25, 2012 · 2 comments

Comments

@r0b-
Copy link

r0b- commented May 25, 2012

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

@apsavin
Copy link
Owner

apsavin commented May 27, 2012

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.

@amaduki
Copy link
Contributor

amaduki commented Aug 4, 2012

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

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants