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

with Android #21

Open
bidasknakayama opened this issue Oct 27, 2015 · 1 comment
Open

with Android #21

bidasknakayama opened this issue Oct 27, 2015 · 1 comment

Comments

@bidasknakayama
Copy link

Hi

When we use it with Android, and Magnify the canvas,
it does not work, I could not draw any line on canvas.
but if I go back 100% display , it work.
Do you have any reason ?

Kazu

@bidasknakayama
Copy link
Author

instead of this code,

x = event.touches[0].pageX - $canvas.offset().left; + borderLeftWidth;
y = event.touches[0].pageY - $canvas.offset().top; + borderTopWidth;

I wrote this.

var e = event;
var el=e.target, c=el;

var x=e.touches[0].pageX, y=e.touches[0].pageY;
do {
x -= el.offsetLeft;
y -= el.offsetTop;
el = el.offsetParent;
} while (el);

I worked at good when Android browser zooming.

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

1 participant