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.1.1 to 0.1.2

17

js-image-zoom.js

@@ -9,10 +9,10 @@ (function (root, factory) {

/**
* @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)
*/

@@ -183,3 +183,2 @@ return function ImageZoom(container, options) {

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;';

@@ -186,0 +185,0 @@

{
"name": "js-image-zoom",
"version": "0.1.1",
"version": "0.1.2",
"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