npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wheelzoom

v4.0.1

Published

Zoom IMG elements on mousewheel or touchpad scroll.

Downloads

1,088

Readme

Wheelzoom

A small script for zooming IMG elements with the mousewheel/trackpad. Wheelzoom works by replacing the img element's src with a transparent image, then using the original src as a background image, which can be sized and positioned. Wheelzoom is dependency free, doesn't add any extra elements to the DOM, or change the positioning of the IMG element.

Usage:

wheelzoom(document.querySelectorAll('img'));
// or
wheelzoom(document.querySelectorAll('img'), {zoom:0.05});
// zoom sets the zoom percent.

License

MIT License

Supported Browsers:

Chrome, Safari, Opera, FireFox 17+, IE9+.

Changelog:

v.4.0.1 - 2019/08/13
  • Added initialX and initialY for setting the initial zoomed coordinates
v.4.0.0 - 2018/10/09
  • Replaced canvas data URI with base64 svg for creating placeholder
  • Dropped IE9 support
v.3.1.3 - 2018/01/31
  • Added 'initialZoom' option. Resolves #32
v.3.1.2 - 2017/04/20
  • Added package.json & added to NPM.
v.3.1.0 - 2017/04/10
  • Added 'maxZoom' option for maximum zoom level.
v.3.0.4 - 2015/12/15
  • Automatically account for changes to the img src, to avoid requiring manually calling destroy and reapply.
v.3.0.3 - 2015/09/05
  • Fixed zoom positioning issue in Firefox. Fixes #17
  • Fixed error when calling destroy in Firefox. Fixes #16
  • Removed debugging statement. Fixes #15
v.3.0.2 - 2015/09/05
  • Fixed lint warnings and bug introduced in 3.0.1
v.3.0.1 - 2015/09/05
  • Fixed issue with src URLs that contain single quotes. Fixes #13.
v.3.0.0 - 2014/10/14
  • Removed jQuery dependency
  • Added 'wheelzoom.destroy' event for removing changes that wheelzoom has made to an element.
v.2.0.1 - 2014/9/9
  • Merged bugfix to wrap background-image path in quotes. Ref #8.
v.2.0.0 - 2014/4/17
  • Simplified by dropping support for having border and padding on the img element. Borders and/or padding should be applied to the parent element, rather than the img element.
v.1.1.3 - 2014/4/13
  • Minor code improvement.
v.1.1.2 - 2013/1/31
  • Fixed bug with unzoom trigger.
v1.1.1 - 2013/1/29
  • Added trigger to unzoom image:
	$('#example').trigger('wheelzoom.reset')
v1.1.0 - 2012/11/28
  • Added dragging.
v1.0 - 2012/11/26
  • Initial release.