viktorlarsson / vue-tiny-slider

Vanilla javascript slider for all purposes created by ganlanyuan in Vue.
MIT License
136 stars 51 forks source link

Slides transition #64

Open alfre144 opened 4 years ago

alfre144 commented 4 years ago

I'm trying to move between slides only for dragged distance.

Instead of moving from one slide to another (width of the next slide), I want to move slider only for dragged distance.

For example, if I have 6 elements, each one of 100px, instead of having:

style="transform: translate3d(0px, 0px, 0px); ... style="transform: translate3d(-100px, 0px, 0px); ... style="transform: translate3d(-300px, 0px, 0px);

I want to be able to move only, for e.g: 30px

So...

style="transform: translate3d(-30px, 0px, 0px);

or just drag a little bit as 5px and have...

style="transform: translate3d(-5px, 0px, 0px);

It is possible?

Thanks in advance.