e-oj / Magic-Grid

A simple, lightweight Javascript library for dynamic grid layouts.
https://www.npmjs.com/package/magic-grid
MIT License
3.14k stars 144 forks source link

Does not work for dynamic content #40

Closed BonBonSlick closed 4 years ago

BonBonSlick commented 4 years ago

https://jsfiddle.net/cvmgt92q/5/

Images continuously loaded. As you can see positions are wrong for new images.

BonBonSlick commented 4 years ago

I think there is should be something like collision detection from game dev experience for overlapping images.
And additional check how far the image is, eg it can not be positioned more than 1 + gap px far away from another image. The drawing algorithm requires improvements, or I am doing something wrong.

jiahong96 commented 1 year ago

@BonBonSlick did you find any solution for this?