Skip to content

Commit

Permalink
Merge pull request #6 from malaman/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
malaman authored Oct 14, 2016
2 parents de6e379 + a27ca0d commit 027c637
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions package/js-image-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
}
}(this, function () {
/**
* @param {Object} container DOM element, which contains an image to be zoomed
* @param {Object} options js-image-zoom options
* @param {number} width Image width
* @param {number} height Image height
* @param {number} zoomWidth Zoomed image width
* @param {string} img Url of image to zoom. If provided container children is ignored
* @param {number} scale Zoom scale. If provided zoomWidth param is ignored
* @param {object} offset {vertical, horizontal} offset in pixels between original image and zoomed image
* @param {Object} container DOM element, which contains an image to be zoomed (required)
* @param {Object} options js-image-zoom options (required)
* @param {number} width Image width (required)
* @param {number} height Image height (required)
* @param {number} zoomWidth Zoomed image width optional if scale param is provided
* @param {string} img Url of image to zoom. If provided container children is ignored (optional)
* @param {number} scale Zoom scale. If provided zoomWidth param is ignored (optional if zoomWidth param is provided)
* @param {object} offset {vertical, horizontal} offset in pixels between original image and zoomed image (optional)
*/
return function ImageZoom(container, options) {
"use strict";
Expand Down Expand Up @@ -179,7 +179,6 @@
backgroundRight = offsetY * scaleY;
backgroundPosition = '-' + backgroundTop + 'px ' + '-' + backgroundRight + 'px';
data.zoomedImg.element.style.backgroundPosition = backgroundPosition;
data.zoomedImg.element.style.display = 'block';
data.zoomLens.element.style.cssText = data.zoomLens.element.style.cssText + 'top:' + offsetY + 'px;' + 'left:' + offsetX + 'px;display: block;';

}
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-image-zoom",
"version": "0.1.1",
"version": "0.1.2",
"main": "js-image-zoom.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit 027c637

Please sign in to comment.