siema icon indicating copy to clipboard operation
siema copied to clipboard

Add center option and offset option

Open m4n1ok opened this issue 6 years ago • 4 comments

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,

m4n1ok avatar Jul 15 '18 14:07 m4n1ok

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

UndergroundLabs avatar Aug 09 '18 12:08 UndergroundLabs

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

pawelgrzybek avatar Aug 09 '18 13:08 pawelgrzybek

@pawelgrzybek any news about this?

milestojanovic3 avatar May 19 '20 11:05 milestojanovic3

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

benjibee avatar Nov 27 '20 13:11 benjibee