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

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-40.64%
Maintainers
1
Weekly downloads
 
Created
Source

js-image-zoom

Overview

Pure JavaScript utility for desktop browsers for image zoom on mouse hover. No external dependencies required.

Demo

Demo

Arguments

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

RouteMap

  • extend testing coverage
  • add aditioinal examples

Keywords

FAQs

Package last updated on 03 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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