After changing the browser window size, a bug appears in the width calculation of react-grid-item.
kkbda opened this issue · comments
Describe the bug
After changing the browser window size, a bug appears in the width calculation of react-grid-item.Here is my code
demo-adress: https://github.com/kkbda/grid-demo
And I also recorded a video。
Your Example Website or App
dev
Steps to Reproduce the Bug or Issue
- pull my code and run
- resize broswer
Expected behavior
width and height always correct
react-grid-layout library version
1.4.1
Operating System Version
MacBook Pro 13-inch, M1, 2020
Browser
Chrome
Additional context
No response
Screenshots or Videos
video2.mp4
This is relatively reasonable; there are many fractional sizes possible as you resize the browser, it's expected that grid items won't line up exactly to the subpixel.
If this is a problem for you, you could dive into:
react-grid-layout/lib/calculateUtils.js
Lines 37 to 90 in 8191403
I have this same issue...