Giter Club home page Giter Club logo

angular-masonry-fly's Introduction

angular-masonry-fly

####Generates masonry layout image by image without knowing their height or waiting for all images to load.

  • Works with infinite scroll and window resizing.
  • No need to know images height or wait for all images to download.
  • Can be used on same page on different containers(new)

#####DEMO http://bimal1331.github.io/angular-masonry-fly

#####REQUIREMENTS

  • Angularjs 1.2+ only

#####INSTALLATION

  • Download angular-masonry.min.js and include it with your JS files.
  • Include module masonryLayout in your main app module.

or

use Bower to install bower install angular-masonry-fly

#####USAGE

  • Use directive data-masonry like below -

     <div data-masonry data-x-margin="20" data-y-margin="30" data-img-width="250" style="margin:3% 2% 0 2%; padding: 			20px 1% 0; border:1px solid black; width:43%; float:left;">
     	<div data-ng-repeat="image in images" style="border:1px solid black; border-radius:5px; padding:1px;">
     		<img ng-src="http://lorempixel.com/{{image.src}}">		
     	</div>
     </div>
    • data-x-margin - Horizontal gap between image containers
    • data-y-Margin - Vertical gap between image containers
    • data-img-width - Image width you'll be using for the layout, ideally should be image's natural width

That's it!

angular-masonry-fly's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.