js-image-zoom
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -18,2 +18,3 @@ (function (root, factory) { | ||
* @param {string} zoomStyle custom style applied to the zoomed image (i.e. 'opacity: 0.1;background-color: white;') | ||
* @param {string} zoomLensStyle custom style applied to to zoom lents (i.e. 'opacity: 0.1;background-color: white;') | ||
*/ | ||
@@ -121,2 +122,8 @@ return function ImageZoom(container, opts) { | ||
} | ||
if (options.zoomLensStyle) { | ||
data.zoomLens.element.style.cssText += options.zoomLensStyle; | ||
} else { | ||
data.zoomLens.element.style.background = 'white'; | ||
data.zoomLens.element.style.opacity = 0.4; | ||
} | ||
scaleX = data.sourceImg.naturalWidth / options.width; | ||
@@ -132,7 +139,5 @@ scaleY = data.sourceImg.naturalHeight / options.height; | ||
} | ||
data.zoomLens.element.style.position = 'absolute'; | ||
data.zoomLens.element.style.width = data.zoomLens.width + 'px'; | ||
data.zoomLens.element.style.height = data.zoomLens.height + 'px'; | ||
data.zoomLens.element.style.position = 'absolute'; | ||
data.zoomLens.element.style.background = 'white'; | ||
data.zoomLens.element.style.opacity = 0.4; | ||
data.zoomLens.element.pointerEvents = 'none'; | ||
@@ -139,0 +144,0 @@ }; |
{ | ||
"name": "js-image-zoom", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"main": "js-image-zoom.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
13947
3
232
0
78