vue-grid-layout
vue-grid-layout copied to clipboard
Aspect ratio is not always kept because of snapping to grid.
After setting the preserveAspectRatio option to true, I observed that not all the elements actually keep the aspect ratio. For ratio = 1, everything seems to be fine, but for other aspect ratios, it doesn't seem to work because of the snapping back to grid.
When I'm resizing the element, I can see that it has the correct aspect ratio, but when dropping it, because it takes the closest place in the grid, it doesn't always takes into account the aspect ratio.
I found a fix to ensure that the aspect ratio is preserved if the preserveAspectRatio option is true and I will add a PR asap.
@gmsa is this something you plan support in the library?