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

Finite variable width slider slides always fill the display area #1337

Closed
wants to merge 5 commits into from

Conversation

diegopamio
Copy link

Fixes #1334

I've added some logic to snap the right side of the last slide to the right side of the scrolling window.

This way you avoid having a right blank padding when getting to the last elements and they don't fill up the entire gallery. See [issue akiran#1334](akiran#1334)
There were inconsistencies between the changelog and the actual tags applied.
@cgadam
Copy link

cgadam commented Aug 15, 2018

This is nice @diegopamio! Please consider the case when there are few items in the carousel. I can see a bug in this case where the few items (in this case just 2) get aligned to the right instead of left as they are supposed to!

See GIF:
csqm77ty3l

They are not needed, only the non infinite scroll mode.
…hort

Snapping to the right never should make the list to have left padding, for instance when the list of images in the gallery doesn't fill up the entire window.
and adds release change log.
@diegopamio
Copy link
Author

@cgadam done, now it doesn't snap to the right if the width of all the available images is less than the width of the container.

Copy link

@imprfekt imprfekt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diegopamio Hey, thanks for the effort! One more thing:
Although this really removes the right padding, when you reach the end you still allow the "next" arrow to be clickable, which shouldn't be the case.

https://codesandbox.io/s/6l4wpv0q8z

image

@bgoldfarb
Copy link

What is the status of this PR? @diegopamio

@pinglinh
Copy link

Yeah I agree with @precompiled! This needs to be resolved too :/

@ydegtyar
Copy link

ydegtyar commented Feb 2, 2019

Will it be merged?

@groomain
Copy link

groomain commented May 14, 2019

Will it be merged one day ? 🙏 @akiran

@diegopamio
Copy link
Author

I'm having little to nothing free time for this, If anyone can help on @precompiled request, or if we can do it separately, I can collaborate.

@groomain
Copy link

I've finally switched to swiper. Thanks !

@Charlie91
Copy link

@diegopamio, Hi! I faced the same problem that this PR solves, and wouldn't mind to finish your job. Could you add me to collaborators of the fork so I could add commits here?

@diegopamio diegopamio closed this Nov 22, 2022
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

Successfully merging this pull request may close these issues.

Finite variable width slider (that scrolls only visible slides), slides should always fill the display area
8 participants