djaodjin-annotate
djaodjin-annotate copied to clipboard
Wrong annotate drawing position on small screen.
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?
Most likely yet. The (x,y) click coordinates need to be scaled by a ratio at some point before being stored. @StephaneRob?
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.
Pushed a new version 0.0.3.