react-grid-gallery icon indicating copy to clipboard operation
react-grid-gallery copied to clipboard

Images per row

Open sT0pe opened this issue 5 years ago • 3 comments

<Gallery images={images} enableImageSelection={false} backdropClosesModal={true} rowHeight={100} maxRows={2} margin={0} />

thumbnail 100x100 rowHeight={100}

Expected behaviour

gallery wrapper width < 300 than third image goes to second row

Actual behaviour

Third image goes down only after width <=200

So is it possible do not compress images, but if there is no enough space just move to the next row?

sT0pe avatar Jul 08 '19 10:07 sT0pe

I am also looking for this, I am not hopeful though as the project has been abandoned

mattg66 avatar Nov 18 '20 14:11 mattg66

Hello @sT0pe and @mattg66 👋

Do you want thumbnails to keep the original aspect ratio, i.e. no edges have been cut? React-grid-gallery uses compression for the gallery to have all rows completely filled. It's the main idea of the library. If it hasn't been done gallery may look like this on some resolutions. Is that behavior your ask for?

Снимок экрана 2022-08-10 в 20 52 25

The original gallery used on photos.google.com doesn’t do compression of images. Instead, it can vary row height to avoid incomplete rows. I think it's interesting and we may implement this strategy as an option in the next releases.

Can you please clarify your use case?

itoldya avatar Aug 10 '22 17:08 itoldya

Hi @itoldya, yes that is exactly what I was looking for in 2019. Would be nice to have an option for such behavior.

sT0pe avatar Aug 11 '22 18:08 sT0pe