-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |