diff --git a/docs/network/interaction.html b/docs/network/interaction.html
index 4be1c97b..ad3deb15 100644
--- a/docs/network/interaction.html
+++ b/docs/network/interaction.html
@@ -70,7 +70,8 @@ var options = {
selectable: true,
selectConnectedEdges: true,
tooltipDelay: 300,
- zoomView: true
+ zoomView: true,
+ zoomSpeed: 1
}
}
@@ -109,6 +110,7 @@ network.setOptions(options);
selectConnectedEdges | Boolean | true | When true, on selecting a node, its connecting edges are highlighted. |
tooltipDelay | Number | 300 | When nodes or edges have a defined 'title' field, this can be shown as a pop-up tooltip. The tooltip itself is an HTML element that can be fully styled using CSS. The delay is the amount of time in milliseconds it takes before the tooltip is shown. |
zoomView | Boolean | true | When true, the user can zoom in. |
+ zoomSpeed | Number | 1 | The default speed of "1" (arbitrary unit) is moderately fast. Speed changes apply only to manual zooming (e.g. with mouse scroll wheel). |
diff --git a/lib/network/modules/InteractionHandler.js b/lib/network/modules/InteractionHandler.js
index 1e62825b..cbdc4901 100644
--- a/lib/network/modules/InteractionHandler.js
+++ b/lib/network/modules/InteractionHandler.js
@@ -53,7 +53,8 @@ class InteractionHandler {
},
navigationButtons: false,
tooltipDelay: 300,
- zoomView: true
+ zoomView: true,
+ zoomSpeed: 1
};
util.extend(this.options,this.defaultOptions);
@@ -520,7 +521,7 @@ class InteractionHandler {
// calculate the new scale
let scale = this.body.view.scale;
- let zoom = delta / 10;
+ let zoom = delta * (this.options.zoomSpeed / 10);
if (delta < 0) {
zoom = zoom / (1 - zoom);
}
diff --git a/lib/network/options.js b/lib/network/options.js
index ac9dc793..ff614a5d 100644
--- a/lib/network/options.js
+++ b/lib/network/options.js
@@ -167,6 +167,7 @@ let allOptions = {
hoverConnectedEdges: { boolean: bool },
tooltipDelay: { number },
zoomView: { boolean: bool },
+ zoomSpeed: { number },
__type__: { object }
},
layout: {
@@ -572,7 +573,8 @@ let configureOptions = {
selectConnectedEdges: true,
hoverConnectedEdges: true,
tooltipDelay: [300, 0, 1000, 25],
- zoomView: true
+ zoomView: true,
+ zoomSpeed: 1
},
manipulation: {
enabled: false,