Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/599316527/waterfall-layout
Calculate width & position for items of waterfall
https://github.com/599316527/waterfall-layout
Last synced: 27 days ago
JSON representation
Calculate width & position for items of waterfall
- Host: GitHub
- URL: https://github.com/599316527/waterfall-layout
- Owner: 599316527
- License: mit
- Created: 2018-01-25T14:33:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-26T04:18:59.000Z (almost 7 years ago)
- Last Synced: 2024-11-16T04:51:45.752Z (about 2 months ago)
- Language: JavaScript
- Size: 1.72 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Waterfall Layout
Calculate width & position for items of waterfall
```js
import layout from 'waterfall-layout'layout(items, options = {}) // => { grids, containerHeight }
````items` is an array of ratio value of width and height or object which contains width and height value.
```js
[
16 / 9,
{width: 960, height: 540}
]
```Options for layouting are listed in [example](example/index.js#L5-L22).
![Diagram-of-options](assets/Diagram-of-options.jpg)