-
Notifications
You must be signed in to change notification settings - Fork 146
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
Does MovingBoxes support images of different widths? #81
Comments
Here is the start to an implementation of my request: http://jsfiddle.net/Wb2Ra/5/ It takes images of different widths and heights (known in advance) and scales them according to o.reduceSize. All I'm doing is saving the original widths in the data() section of each panel instead of always using the first panel width. At the current moment, it is working for a limited use case. |
Hi @fgosfacdjtq! It seems that the centering of the images is still a bit off. Sadly, I don't have much free time lately to work on this enhancement, but it is on my to-do list. |
I noticed that too. Either the marginLeft value in update() or the leftValue in change() is incorrectly calculated in my version. Can you give me some background on the purpose of those values and I'll try to come up with a fix? |
The margin left is needed to center the very first panel in the viewport because scrollLeft cannot be a negative number.
I'm sure changing the plugin from using Maybe the best solution would be to just start with AnythingSlider's code and just make it always center the panel. |
In looking at the code, I see that the update function sets the widths of all images to be the same as the width of the first image:
Is there any thought to adding the ability to handle different width images?
The text was updated successfully, but these errors were encountered: