Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pass in box sizes and get back sizes and coordinates for a justified layout

License

NotificationsYou must be signed in to change notification settings

flickr/justified-layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusCoverage Status

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:

Demonstration

Install

npm install justified-layout

Easy Usage

varlayoutGeometry=require('justified-layout')([1.33,1,0.65][,config])

Full Documentation and Examples

Find it here:http://flickr.github.io/justified-layout/

License

Open Source Licensed under the MIT license.

About

Pass in box sizes and get back sizes and coordinates for a justified layout

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp