vue-grid-layout icon indicating copy to clipboard operation
vue-grid-layout copied to clipboard

Aspect ratio is not always kept because of snapping to grid.

Open MadalinaCi opened this issue 4 years ago • 1 comments

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.

MadalinaCi avatar Feb 01 '21 15:02 MadalinaCi

@gmsa is this something you plan support in the library?

validide avatar Jul 09 '21 09:07 validide