jakubfiala / atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.
http://fiala.space/atrament/demo
MIT License
1.56k stars 115 forks source link

When scrolling down the line is above the cursor #12

Closed jordyvandomselaar closed 8 years ago

jordyvandomselaar commented 8 years ago

I can't really screenshot this, but wehen I'm scrolled up the line is right underneath my cursor, and when I scroll down the line is above my cursor.

Edit: It only happens in device emulator mode.

jakubfiala commented 8 years ago

I think I know what this problem is – essentially, the mousemove event returns coordinates that aren't scaled properly. Which device emulator mode are you using? Is it Chrome's? It might be that it doesn't take into account the viewport meta tag, or it's just a bug. Let me know if this is critical to your project, but if not I'll close this, as I don't think it's a problem with the library.

jordyvandomselaar commented 8 years ago

I've find out that this also happens on actual mobile devices (ipad). Could you look into this?

jakubfiala commented 8 years ago

Ok, that's good to know. In that case, it may be a problem with handling the changedTouches here. Sounds possible because I never tested on mobile with a scrolling canvas, only one that was 100vw, 100vh. Will look into it.

jordyvandomselaar commented 8 years ago

Thanks man :D