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

Image flickers around #3

Open
fredericoschardong opened this issue Aug 2, 2013 · 3 comments
Open

Image flickers around #3

fredericoschardong opened this issue Aug 2, 2013 · 3 comments

Comments

@fredericoschardong
Copy link

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?

@rombdn
Copy link
Owner

rombdn commented Aug 4, 2013

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

@scooterlord
Copy link

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?

@kevinmcalear
Copy link

+1

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

4 participants