StartIndex and Center options not consistent when no space on the sides
pdoreau opened this issue · comments
Issue description:
I'm trying to keep a "selected" slide in the center of the screen.
For example, with 3 sildes, I'd like the second to always be on the center of the screen when the page has just loaded.
It works well with startIndex and center options, but only when there is no space left on the sides (no space on the left of the first side, no space on the right of the last side).
Demo link/slider setting:
On this demo, .container
div has a width of 600px, and the problem appears : the slide number 0 is in the center instead of the number 1.
If you replace 600px by 599px, the problem does not appear : the slide number 1 is in the center
How to make the slide 1 to be in the center, even for .container
width >= 600px ?
Tiny-slider version: 2.9.4
Browser name && version: Firefox 99
OS name && version: Ubuntu 21.10