1.0.1 • Published 5 years ago

grid-align v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Grid Align

NOTE: I know the algorithm is not perfect, but it is the fastest one I could come up with for working with a lot of items (100+)

Install:

npm i -S grid-align

Options

randomizeRows

Randomizes the order of the rows (excluding the last row). With this option disabled, the larger elements will all be at the top of the grid.

alignGrid(element, {
	randomizeRows: true
});

animation

Duration (in milliseconds) animation should last during alignment.

alignGrid(element, {
	animation: 1000
});