-
Notifications
You must be signed in to change notification settings - Fork 63
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
Position error and correction recommendation #27
Comments
Thanks, @newpro, looking at it for the next version of the library. |
Here's another potential problem and proposed solution: When you set the canvas' max-width to 100% you can get a full canvas shrunk down to a size smaller than normal. To account for this, figure out the ratio between the canvas's width and its displayed width like so:
|
This solved my issue with this plugin. Thanks BoldBigflank
|
Thanks BoldBigflank. This helped on mobile, when the screen size was smaller than the initial canvas size. I added a ratio in the y direction as well:
|
Hey guys!
I believe there is an error in event position getter.
The following code does not consider position of canvas DOM parent :
Since offsetLeft/Top only consider relative position to parent, so if parent is not at 0,0, the function return wrong coordinates.
Recommend change to:
The text was updated successfully, but these errors were encountered: