@smeijer one of the benefits of not having having the images in row elementes I think!
possibly @neptunian , the demo looks awesome :)
hi, is it possible to change the layout of Gallery?
@pzoli1988 what do you have in mind
the only thing that can change really are the amount of columns.
@neptunian When resizing that sortable example in codesadbox.io I got this: Invariant Violation Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
@mpartipilo thanks i'll do some testing. i've thought about putting a debounce on the window resize but i like how it looks like its animating when you resize it! not really necessary to let it call so many times though.
Hello guys, wanted to ask if there was any way I could pass in the aspect ratio for the set of photos given to the Gallery component
@FredEb that's what width and height are for
Hey all - does anyone have tips for limiting the maximum height of the Gallery container?
@FredEb that's all height and width attributes are provided for. the code determines the aspect ratio based on those attributes or you can just pass in 1, 3 or whatever your ratio is... it's the same thing.
@whitneyseiler you should be able to just do that with CSS? Wrap it in a containing div with a max-height?
Hi @neptunian, how are you?
I have worked on your code to add just one feature: thumbnails. But when I was doing it, I realize that I could improve many more things like the tests behaviors.
I created a PR with this features/improvements.
I don't know why the test doesn't work in travis yet, because on my localhost it's running ok
Arrrgg... why can't I get images to render without require('image.jpg')? I'm using local images.
Is it possible for the image gallery to be a horizontal scroll, rather than a vertical scroll?
@shurnster if you define the width of your container wherever, the Gallery will adjust to it, which I imagine would automatically create a horizontal scrollbar. you should be able to control this on your end.
Ok, got it. Thanks, @neptunian
Hi everyone, hi @neptunian --- is it possible to hover and zoom on an individual image? Thanks!
@Tsardines you will have to use the ImageComponent property to pass in custom functionality. see examples on the site
@francisrod01 you have to manage the state in your own app. changing the "photos" object will update the photos shown. if it isn't working you have a problem in your app, not with the gallery.
You can see it on the CodeSandbox example exactly you describe.
I have another component how manage the state calls photo-gallery imported on index.js
This component manages state and update the object to pass on react-photo-gallery component
Hello guys. Thanks for your fantastic work and this react photo gallery. Could someone, possibly, explain how best to implement lazy image loading in the Gallery component?
@marcinostrouch there is an example if you run the development example build by cloning the repo and doing yarn start
@whitneyseiler Did you find a solution for setting the maximum height of the gallery? As @neptunian suggested, i tried wrapping it in a div and setting max-height on that, and it did not work
I even tried just setting the height, that doesn't seem to work either
Has anyone been able to successfully set the height of a react-photo-gallery instance?
Or even set a max height for the images themselves? That could work if necessary
@kingpalethe im not actually sure its possible at the moment. the height of each row is calculated given the width and solving for height based on the aspect ratios of the photos in that row.. so the heights are variable.
@kingpalethe i can add an option to set a max row height, but it will use an algorithm that ignores the "cols" prop. you can't control the row height and also control the photos per row.