0.2.2 • Published 7 years ago

ng-iw-zoom v0.2.2

Weekly downloads
3
License
ISC
Repository
-
Last release
7 years ago

iwZoom

An angular directive for implementing zoom on any DOM element

Installation

  • yarn add ng-iw-zoom (or npm install)
  • include the iw-zoom.directive.js file located in the dist/ folder
  • add iwZoom to your module dependencies angular.module('app', ['iwZoom'])
  • include the <zoomer></zoomer> wherever you want the directive to display inside your HTML

Usage

  • You'll need to pass the directive options using the options="" attribute on the <zoomer> element
  • Most likely, you'll want to style this directive. A sample stylesheet is provided in src/sass (sample requires bourbon)

Options

The options attribute accepts a valid JSON object. selector is the only REQUIRED option.

optiontypedescriptiondefault
selectorstringThe class or ID of the element you want to make "zoomable"None, required
minintthe minimum value of zoom0.75
maxintthe maximum value of zoom10.0
stepintthe legal number intervals for the slider element.0.25
defaultZoomintthe default zoom level1

Tip: The step attribute can be used together with the max and min attributes to create a range of legal values.

Table of contents

TOC