Closed naglalakk closed 5 years ago
Hello @naglalakk could you check #44 does that sound similar ?
Hi I had to use another solution because of time constraints so I'm not debugging this atm. I checked the #44 issue and this code should be doing the very same thing. But I didn't get it to work for some reason. I'll close this and reopen if I look into this further. Thank you
Hi and thank you for this plugin. I'm having a weird issue with the masonry. I'm using scroll to update a photo gallery so each time a user scrolls down to the bottom more images are added (40 each time) until the gallery is complete.
When adding images the masonry takes a fairly long time to arrange them into correct positions and adjust the whole grid correctly, leaving them in a awkward state for a few seconds See pic here: https://ibb.co/TwCkS0m
This could absolutely be my implementation. But I fail to see which steps I'm missing. After going through some similar issues here I see that people solved this with the imagesLoaded plugin where they redraw the masonry on each image processed.
This is the code which handles loading the initial batch for the photo gallery
And here is the code that handles addding more images on scroll
The template
The imagesLoaded handler
When adding images the jsheap seems to get pretty big. For about 200-300 images it goes up to 140mb. The images are only thumbnails and are kept in objects which do not contain a lot of info. In the code above I also do Object.freeze(x) to each object to keep them immutable.