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

Wrong annotate drawing position on small screen. #30

Open
krishna711 opened this issue Jan 5, 2016 · 3 comments
Open

Wrong annotate drawing position on small screen. #30

krishna711 opened this issue Jan 5, 2016 · 3 comments

Comments

@krishna711
Copy link

I found one issue(client also reported that) on mobile device and on desktop as well when image is resize on small view port. I added base_layer and drawing_layer max-width to 100% so image can resize and fit on small screen but when we draw on resize image then drawing does not occur on proper place. Drawing happen too far from actual mouse pointer or touch point on touch screen.

Is it possible to fix this?

@smirolo
Copy link
Contributor

smirolo commented Jan 6, 2016

Most likely yet. The (x,y) click coordinates need to be scaled by a ratio at some point before being stored. @StephaneRob?

@StephaneRob
Copy link
Contributor

Yes, my idea is to calculate a rate with the real image size and the displayed image size to compensate position, line width or font-size. This rate will be calculated on resize event to be able to redraw the canvas with the current data.

smirolo added a commit that referenced this issue Jan 7, 2016
#30: responsive annotate position, linewidth, fontsize
@StephaneRob
Copy link
Contributor

Pushed a new version 0.0.3.

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