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

Starting position not working #59

Open
anuran-Chakraborty opened this issue Jan 6, 2021 · 3 comments · Fixed by #60
Open

Starting position not working #59

anuran-Chakraborty opened this issue Jan 6, 2021 · 3 comments · Fixed by #60

Comments

@anuran-Chakraborty
Copy link

anuran-Chakraborty commented Jan 6, 2021

{
      responsive: [
        { end: 576, size: 2 },
        { start: 576, end: 768, size: 3 },
        { size: 8 },
      ],
      position: {
        // Start from '1' on mounted.
        start:0,
      },
    },

using the above snippet in the options does not move the starting postion. It is starting from a position such that there is no right scroll. That is in this case for a desktop env it is starting woth the last 8 elements. How can I make it start from 0.

@fuxingloh
Copy link
Owner

You might want to use another repo called Vue Horizontal instead. It has better support and testing.

  1. GitHub Repo: https://github.com/fuxingloh/vue-horizontal
  2. All features and docs: https://vue-horizontal.fuxing.dev/features
  3. Starting position with mounted: https://vue-horizontal.fuxing.dev/others/autoplay#mounted

@anuran-Chakraborty
Copy link
Author

I had used this but was facing some other issue as the scroll button was not appearing on desktop systems. So i used this. This works fine except for the starting position. On all systems it is starting from the last 2 or last 3 or last 8. It would be great if you could solve this.

@fuxingloh
Copy link
Owner

fuxingloh commented Jan 7, 2021

Wild hunch is your content collapsing because it's empty? For reference: https://css-tricks.com/make-sure-columns-dont-collapse-horizontally/

Additionally <img> causes content to collapse when it's still loading, if so adding a min-height: 1px might help.

@fuxingloh fuxingloh linked a pull request Jan 8, 2021 that will close this issue
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 a pull request may close this issue.

2 participants