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.1 to 1.2.2

3

index.js

@@ -13,3 +13,3 @@ /* globals SVGElement */

var speed = 0.065
var defaultZoomSpeed = 0.065

@@ -36,2 +36,3 @@ module.exports = createPanZoom;

var beforeWheel = options.beforeWheel || noop
var speed = typeof options.zoomSpeed === 'number' ? options.zoomSpeed : defaultZoomSpeed

@@ -38,0 +39,0 @@ var touchInProgress = false

{
"name": "panzoom",
"version": "1.2.1",
"version": "1.2.2",
"description": "Pan and zoom SVG elements",

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

@@ -22,3 +22,3 @@ # panzoom

```
https://cdn.rawgit.com/anvaka/panzoom/v1.0.0/dist/panzoom.min.js
https://cdn.rawgit.com/anvaka/panzoom/v1.2.1/dist/panzoom.min.js
```

@@ -100,4 +100,15 @@

zooomable only when `Alt` key is down.
## Zoom Speed
You can adjust how fast it zooms, by passing optional `zoomSpeed` argument:
``` js
panzoom(document.getElementById('g4'), {
zoomSpeed: 0.065 // 6.5% per mouse wheel event
});
```
# 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