Comparing version 1.2.1 to 1.2.2
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119897
1222
113