Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-image-zoom

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-image-zoom - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

README.md

11

js-image-zoom.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc