Scrolling too far to the left when reaching the last image
Closed this issue · 6 comments
First of all, this is a really great plugin, thanks for it.
I have created an example on a customer site (http://www.buchingerwilhelmi.com/node/103) which uses the plugin and when you scroll to the very last image, you end up seeing 3 images and some free space right of the last image.
This is because I have defined that there are 3 images visible but I used that value 3 only as a compromise. A precise number can't be given as the thumbnails have different widths.
What would be ideal if the plugin would no go further to the left, if the last image has reached the right border of the container. Do you know what I mean?
I'm afraid I can't see your example but I understand what you mean.
Because of the way the carousel layout works the wrapper around the slides must be adjusted to be the correct width. It's a bit heavy-handed, a little dumb and not particularly flexible but it is very reliable.
To ensure that the carousel does not run past the maximum scroll width would require individually calculating the widths of each slide or using a different layout technique (such as http://jsfiddle.net/i_like_robots/eWv57/).
If you can get your demo into a publicly available place there may be a decent enough solution.
Oh sorry, the system was automatically switching language and the english page had no slideshow included yet.
Please use the link http://www.buchingerwilhelmi.com/node/103?language=de to force the german page being displayed which includes a slideshow.
Thanks,
I think in this instance you may be better off with another component, this script is limited to slides of the same size. The code changes to make it work are fairly minor but come with performance penalties, and I'd rather avoid them if most integrations of the slideshow are for same-width slides.
I'm happy to review any pull-requests if you can think of a neat way of getting the functionality you would like. For now I'll close the issue but if you have any code to share please re-open and attach it to this thread.
Well, if "the code changes to make it work are fairly minor" I would want to kindly ask if you couldn't make them available, either in public to the module or privately for the time being.
The argument, that such feature would be a performance issue probably doesn't stand because you have an option "slideWidth" and if that's set to false, you would want to calculate the width dynamically and only hen the performance might be affected. In all other cases, it would just operate as now.
Unfortunately, I can't re-open this ticket. Hope you get a notification still.
The code is free and Open Source, you are welcome to make the necessary changes to get the exact functionality you would like.
What if I don't have the skills? Is there a way to sponsor such development?