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

Add center option and offset option #195

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

m4n1ok
Copy link

@m4n1ok m4n1ok commented Jul 15, 2018

Hi @pawelgrzybek ,

I added two options (center and offset) for Siema based on issues for center mode #133 , #152, #125 and logic of @tvanro.

Offset option gives the possibility to have a slider with for example 1.25 item per page.
Combined with center option, we can have a slider like that: 25% prev item / current item / 25% next item.
However, we can configure offset option by breakpoint as for perPage attribute.

I did also a little refactor for offset calculation.
We can discuss about those changes.

Configuration example:

        selector: this.$refs.carousel,
        duration: 350,
        easing: 'cubic-bezier(0.6, 1.02, 1.0, 0.93)',
        startIndex: 3,
        center: true,
        perPage: {
          300: 1,
          800: 3
        },
        offset: {
          300: 0.5,
          800: 0.25
        },
        draggable: true,
        multipleDrag: true,
        threshold: 30,
        loop: true,
        rtl: false,

@UndergroundLabs
Copy link

It doesn't look like this repo is maintained anymore. Maybe fork it and just release an new version.

@pawelgrzybek
Copy link
Owner

It is maintained but I don't have enough time to release version 2.0 (that will come with this feature). It will be released soon you can be assured.

Thanks

@milestojanovic3
Copy link

@pawelgrzybek any news about this?

@benjibee
Copy link

Here I am many years later needing this exact functionality. Any reason this PR couldn't be merged @pawelgrzybek?

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.

5 participants