Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
malaman committed Dec 16, 2016
1 parent 70a9a46 commit 0478cf0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#js-image-zoom


##Overview

Pure JavaScript utility for desktop browsers for image zoom on mouse hover. No external dependencies required.

##Demo

[Demo](http://malaman.github.io/js-image-zoom/example)

##Arguments

- **container** (Object) - DOM element, which contains an source image
- **options** (Object) - js-image-zoom options
* **width** (number) - width of the source image(required)
* **height** (number) - height of the source image(required)
* **zoomWidth** (number) - width of the zoomed image. Zoomed image height equals source image height(optional if scale param is provided)
* **img** (string) - url of the source image. Provided if container does not contain img element as a tag(optional)
* **scale** (number) - zoom scale. if not provided, scale is calculated as natural image size / image size, provided in params (optional if zoomWidth param is provided)
* **offset** (object) - {vertical: number, horizontal: number}. Zoomed image offset (optional)
* **zoomStyle** (string) - custom style applied to the zoomed image (i.e. 'opacity: 0.1;background-color: white;')

##RouteMap

- [ ] extend testing coverage
- [ ] add aditioinal examples

0 comments on commit 0478cf0

Please sign in to comment.