
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
justified-layout
Advanced tools
Pass in box sizes and get back sizes and coordinates for a justified layout
Pass in box sizes and get back sizes and coordinates for a nice justified layout like that seen all
over Flickr. The explore page is a great example. Here's
another example using the fullWidthBreakoutRowCadence
option on Flickr's
album 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
var layoutGeometry = 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.
FAQs
Pass in box sizes and get back sizes and coordinates for a justified layout
The npm package justified-layout receives a total of 9,880 weekly downloads. As such, justified-layout popularity was classified as popular.
We found that justified-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.