Socket
Book a DemoInstallSign in
Socket

img-middle-responsive

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-middle-responsive

Directive to display an image with reactive centered alignment, both vertically and horizontally.

0.1.4
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

img-middle-responsive - 0.1.4

img-middle-responsive - Directive to display an image with reactive centered alignment, both vertically and horizontally.

Installation

  • Download the latest release: v0.1.4
  • Clone the repository: git clone https://github.com/teorossi82/img-middle-responsive.git
  • Install with Bower: bower install img-middle-responsive

Requirements

The plugin requires

Quick-help for usage

  • Inject into your module the imgMiddleResponsiveMdl dependency:
angular.module('myApp',['imgMiddleResponsiveMdl']);
  • Create an object with the information to pass to the directive:
var url = "https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png"; //url image to visualize
var defaultUrl = "http://placehold.it/200x150"; //url image to visualize if master image is not found
var imgMiddleRespOptions = {
    container:{
        maxWidth:"150px", //maxWidth of image container
        maxHeight:"150px" //maxHeight of image container
    }
}
var clicked = function(){ //function to trigger on click
    alert('clicked');
}
  • Put the directive in your html:
<img-middle-responsive img-url="{{url}}" default-url="{{defaultUrl}}" options="imgMiddleRespOptions" click-action="clicked()"></img-middle-responsive>

Copyright @2016 Matteo Rossi, under [MIT license]

Keywords

multimedia

FAQs

Package last updated on 06 Oct 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.