Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Michelangelo Partipilo
    @mpartipilo
    @FredEb that's what width and height are for
    whitneyseiler
    @whitneyseiler
    Hey all - does anyone have tips for limiting the maximum height of the Gallery container?
    Sandra
    @neptunian
    @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?
    Sebastián Lorenzo
    @slorenzo
    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.
    Sebastián Lorenzo
    @slorenzo
    neptunian/react-photo-gallery#85
    I don't know why the test doesn't work in travis yet, because on my localhost it's running ok
    Let me know what you think about this PR. ;)
    Sandra
    @neptunian
    Just wanted to let peeps know that the Gallery now supports columns or "masonry" type layout instead of just rows: https://codesandbox.io/s/r09k1xj614
    Stephan Meijer
    @smeijer
    Nice. Great work
    christocarr
    @christocarr
    Arrrgg... why can't I get images to render without require('image.jpg')? I'm using local images.
    shurnster
    @shurnster
    Is it possible for the image gallery to be a horizontal scroll, rather than a vertical scroll?
    Sandra
    @neptunian
    @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.
    shurnster
    @shurnster
    Ok, got it. Thanks, @neptunian
    Haley Sulcer
    @Tsardines
    Hi everyone, hi @neptunian --- is it possible to hover and zoom on an individual image? Thanks!
    Francis Rodrigues
    @francisrod01
    Is there possible to change photos via state?
    Here my demonstration's code: https://codesandbox.io/s/50wr02n8q4
    More details about dependencies version in the question: https://stackoverflow.com/q/53472436/3332734
    Sandra
    @neptunian
    @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.
    Francis Rodrigues
    @francisrod01
    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
    Marcin Ostrouch
    @marcinostrouch
    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?
    Sandra
    @neptunian
    @marcinostrouch there is an example if you run the development example build by cloning the repo and doing yarn start
    kingpalethe
    @kingpalethe
    @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
    Sandra
    @neptunian
    @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.
    Sandra
    @neptunian
    @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.
    Sandra
    @neptunian
    some new changes in the works: neptunian/react-photo-gallery#128
    Sandra
    @neptunian
    v7 was released which now uses a graph algorithm to find the best layout for row based layouts. no more specifying columns props and having tiny rows due to differing aspect ratios.
    Michelangelo Partipilo
    @mpartipilo
    @neptunian Awesome!
    Jvst1n
    @Jvst1n
    Hi. At first, Thank you guys for an awesome product. I have a question. Are there any ways to implement your lib without using npm?
    Sandra
    @neptunian
    @Jvst1n if you git clone the repo, then do a yarn build
    in the dist there will be JS files including a UMD one.
    leovcunha
    @leovcunha
    Hi! Is there any recommended way to get img width and height for the gallery
    leovcunha
    @leovcunha
    I chose heights & widths different from original proportion and the image was stretched
    CMcSharry
    @mcshazz
    Hey guys, hope someone can help me with this. You can see the Sandbox here. https://stackoverflow.com/questions/58827484/want-my-react-app-to-render-specific-photos-depending-on-condition . So, I have a Lightbox component and it renders the Gallery component as a child. Now, I can't figure out how to make a specific array of photos load for each instance of the Lightbox. I'm not very experienced and any help would be greatly appreciated!