Skip to content

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

@jose149

Description

@jose149

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions