siema
siema copied to clipboard
Add center option and offset option
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,
It doesn't look like this repo is maintained anymore. Maybe fork it and just release an new version.
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 any news about this?
Here I am many years later needing this exact functionality. Any reason this PR couldn't be merged @pawelgrzybek?