Skip to content

Commit

Permalink
update readme with new params (zoomDefaultPosition, zoomPosition)
Browse files Browse the repository at this point in the history
  • Loading branch information
malaman committed Feb 11, 2019
1 parent 8d80aa3 commit e7600e6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,17 @@ Check basic example in browser:

- **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(optional).
* **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;')
* **zoomLensStyle** (string) custom style applied to to zoom lents (i.e. 'opacity: 0.1;background-color: white;')
* **width** (number) - width of the source image(required)
* **height** (number) - height of the source image(optional).
* **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)
* **zoomContainer** (node) - DOM node reference where zoomedImage will be appended to (default to the container element of image)
* **zoomStyle** (string) - custom style applied to the zoomed image (i.e. 'opacity: 0.1;background-color: white;')
* **zoomPosition** (string) - position of zoomed image. It can be: 'top', 'left', 'bottom' or the default 'right'. (Ignored if `zoomDefaultPosition` is false)
* **zoomDefaultPosition** (boolean) Disable the default position styles in zoomedImage if `false`. (default: true)
* **zoomLensStyle** (string) custom style applied to to zoom lents (i.e. 'opacity: 0.1;background-color: white;')

## For react users

Expand All @@ -74,4 +77,4 @@ React wrapper around js-image-zoom is available:
## RouteMap

- [ ] extend testing coverage
- [ ] add aditioinal examples
- [ ] add additional examples
19 changes: 11 additions & 8 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,17 @@ Check basic example in browser:

- **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(optional).
* **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;')
* **zoomLensStyle** (string) custom style applied to to zoom lents (i.e. 'opacity: 0.1;background-color: white;')
* **width** (number) - width of the source image(required)
* **height** (number) - height of the source image(optional).
* **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)
* **zoomContainer** (node) - DOM node reference where zoomedImage will be appended to (default to the container element of image)
* **zoomStyle** (string) - custom style applied to the zoomed image (i.e. 'opacity: 0.1;background-color: white;')
* **zoomPosition** (string) - position of zoomed image. It can be: 'top', 'left', 'bottom' or the default 'right'. (Ignored if `zoomDefaultPosition` is false)
* **zoomDefaultPosition** (boolean) Disable the default position styles in zoomedImage if `false`. (default: true)
* **zoomLensStyle** (string) custom style applied to to zoom lents (i.e. 'opacity: 0.1;background-color: white;')

## For react users

Expand Down

0 comments on commit e7600e6

Please sign in to comment.