HNHacker News
TopNewBestAskShowJobs

e-oj

94 karma · joined December 31, 2017

submissionscomments
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
This doesn't and I think most grid solutions keep the items separate
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
You're right requestAnimationFrame is more efficient than using the resize listener with a delay. I'm actually working on an update to change that. It'll be fixed soon.
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
No, the library doesn't support that. you should be able to achieve the effect with plain html and css though.
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
Makes it much easier to segment the grid into rows or columns
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
When the components in a grid have different heights, a single longer or shorter component stretches the whole row or leaves unpleasant whitespace at the bottom.
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
Depends on the use case. If the grid's items have varying widths then masonry is the better option. However, for a grid with equal width items, I'll definitely go with magic grid. It's just so much lighter (2.3kb minified) than masonry (23.5kb minified).
e-oj··on Show HN: Magic Grid – A simple JavaScript library for dynamic grid layouts
Github repo: https://github.com/e-oj/Magic-Grid/