djaodjin-annotate icon indicating copy to clipboard operation
djaodjin-annotate copied to clipboard

Wrong annotate drawing position on small screen.

Open krishna711 opened this issue 9 years ago • 3 comments

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?

krishna711 avatar Jan 05 '16 09:01 krishna711

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

smirolo avatar Jan 06 '16 01:01 smirolo

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.

StephaneRob avatar Jan 06 '16 14:01 StephaneRob

Pushed a new version 0.0.3.

StephaneRob avatar Jan 08 '16 15:01 StephaneRob