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 sizing not correct #11

Closed
ghost opened this issue Nov 20, 2014 · 2 comments
Closed

Image sizing not correct #11

ghost opened this issue Nov 20, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 20, 2014

Hi
I've noticed that for whatever reason, data-natural-height and data-natural-width does not pass the values correctly and that the image displayed is really out of proportion. I'm working with a 1024x256 image, but parallax.js expands the image way out of proportion. I am using mostly default settings for testing

parallax

Image 1 is the image as loaded via parallax and image 2 is loaded without. They are both the same sized frame, but for some reason, image 1 (with parallax) is overly zoomed in. Any ideas? Or am I missing a setting?

@mikegreiling
Copy link
Member

Keep in mind that parallax.js needs to zoom into the image enough that there is room for it to slide up and down as you scroll. If you are dealing with a very narrow image like the one you are describing it will zoom in such that there is enough vertical padding to accommodate the parallax effect.

I would recommend cropping the image such that there is more overflow on the top and bottom; say, 1024x512.

@mikegreiling
Copy link
Member

closing pending further feedback...

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

1 participant