Open fredericoschardong opened 11 years ago
Normally this issue is handled in the init part of the animate
function : the canvas is filled by zooming the image based on either image width or height. See https://github.com/rombdn/img-touch-canvas/blob/master/img-touch-canvas.js#L55
Hello. First of all good job with the plugin! Would you care to explain how to do what the above user also requested? Meaning to have the image fit inside the container and not be cropped?
+1
It seems that img-touch-canvas fills the canvas based on the image's width. If the canvas has a fixed size then some blank space is left on the bottom of the canvas. The problem is that zooming the image until it fills the whole canvas makes the image flickers around.
Perhaps zooming the image in the initialization to fit the whole canvas would be one way to avoid that. What should I do to get the image zoomed to fit the canva's area in the initialization?