Is it possible to lock to an aspect ratio? For example, I always want a grid item to be a 2/1 aspect (two wide for every one high)
https://github.com/STRML/react-grid-layout/pull/323 it seems like this PR is waiting for review, I was looking for exactly that, in the meanwhile, you can build the version from source and add those changes and use the build in your project.
(until it gets merge..)
Hello,
I propose a new PR to lock aspect ratio of each gridItem with differents aspects ratios.
You can set an initial aspect ratio (height / width) for one cell of the gridLayout. Example : 1/2.
Also you can set a ratio for the font-size beside the minimum width or height of gridItem. Example : 1 / 20.
Any update on that?...
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days
It's now 2020, and the feature set has updated but I'm not seeing any mention of the locked ratio, does the feature exist now?
Ignore. For those who end up here, one of the libraries that react-grid-layout is based on, react-resizable has the option lockAspectRatio that can be used.