Closed carbonrobot closed 2 months ago
Latest commit: 16cd0ddfee8c307b9dc768ad6b4f773caf85f315
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuka-carousel-website | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 8, 2024 8:09pm |
Fix screen measurement when scrollWidth is a float
The scrollWidth of a container is a rounded float value that causes the measurement to incorrectly round up when using
Math.ceil
if the container's actual size is +/- some small value.This uses
Math.round
for the page calculation when usingscreen
to avoid this problem and adds test coverage for theuseMeasurement
hook.Actual Code fix: https://github.com/FormidableLabs/nuka-carousel/pull/1055/files#diff-d7aa6b5d278c998ec50a4b1441434b2e91b6a23af75fcd2ab8ddec4fff44aa14L30