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

Creeping width decimals error when sliding a carousel of images. #441

Open
jose149 opened this issue Oct 8, 2024 · 0 comments
Open

Creeping width decimals error when sliding a carousel of images. #441

jose149 opened this issue Oct 8, 2024 · 0 comments

Comments

@jose149
Copy link

jose149 commented Oct 8, 2024

If the container of keen-slider has a width with decimals every time the user slides an image it is carrying the decimals of error when setting the transform: translate3d;
For example setting a container with a width of 250.5px and I slide 20 images. You will see in the devtools that the CSS properties min-width and max-width are rounded to 251px, but the translation is taking the 250.5px setting it to: "transform: translate3d(-5.010px, 0px, 0px);" when it should be "transform: translate3d(-5.020px, 0px, 0px);"
Due to this fact the image will be translated 10px to the right, related to the container which has the width of 250.5px.

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

No branches or pull requests

1 participant