Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

align-blocks

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

align-blocks

Align Blocks ============

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Align Blocks

Build Status Codacy Badge Dependency Status devDependency Status

Arrange Images with percentages

Instalation

Using jspm:

jspm install npm:align-blocks

Using npm:

npm install align-blocks

Manual:

Download latest release

<script type="text/javascript" src="dist/js/align-blocks.min.js"></script>

Usage

var gallery = new AlignBlocks.Group([
    new AlignBlocks.Item(100, 200, 'http://example.com/1.jpg'),
    new AlignBlocks.Item(200, 100, 'http://example.com/2.jpg'),
    new AlignBlocks.Item(100, 100, 'http://example.com/3.jpg'),
    new AlignBlocks.Item(300, 200, 'http://example.com/4.jpg'),
]);

gallery.margin = 15;

// extract some of the images into a group
var group = gallery.extract(function (group) {
    return group
        .setHeight(50)
        .horizontalSlice(200)
        .scaleToWidth(200);
});

group.items.forEach(function (item) {
    console.log(item.content);
});

// Get the remaining items
gallery.items;

License

Copyright (c) 2015, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

FAQs

Package last updated on 11 Nov 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc