- Notifications
You must be signed in to change notification settings - Fork87
Pass in box sizes and get back sizes and coordinates for a justified layout
License
flickr/justified-layout
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Pass in box sizes and get back sizes and coordinates for a nice justified layout like that seen allover Flickr. Theexplore page is a great example. Here'sanother example using thefullWidthBreakoutRowCadence option on Flickr'salbum page.
It converts this:
[0.5,1.5,1,1.8,0.4,0.7,0.9,1.1,1.7,2,2.1]
Into this:
{"containerHeight":1269,"widowCount":0,"boxes":[{"aspectRatio":0.5,"top":10,"width":170,"height":340,"left":10},{"aspectRatio":1.5,"top":10,"width":510,"height":340,"left":190}, ...]}
Which gives you everything you need to make something like this:
npm install justified-layout
varlayoutGeometry=require('justified-layout')([1.33,1,0.65][,config])
Find it here:http://flickr.github.io/justified-layout/
Open Source Licensed under the MIT license.
About
Pass in box sizes and get back sizes and coordinates for a justified layout
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.
