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

panzoom

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

panzoom - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "panzoom",
"version": "1.2.0",
"version": "1.2.1",
"description": "Pan and zoom SVG elements",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -81,4 +81,22 @@ # panzoom

## Ignore mouse wheel
Sometimes zooming interferes with scrolling. If you want to alleviate it you
can provide a custom filter, which will allow zooming only when modifier key is
down. E.g.
``` js
panzoom(document.getElementById('g4'), {
beforeWheel: function(e) {
// allow wheel-zoom only if altKey is down. Otherwise - ignore
var shouldIgnore = !e.altKey;
return shouldIgnore;
}
});
```
See [JSFiddle](https://jsfiddle.net/Laxq9jLu/) for the demo. The tiger will be
zooomable only when `Alt` key is down.
# license
MIT
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