diff --git a/dist/vis.js b/dist/vis.js
index 68c27f38..2a4415c9 100644
--- a/dist/vis.js
+++ b/dist/vis.js
@@ -21849,6 +21849,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.body = body;
this.pixelRatio = 1;
this.resizeTimer = undefined;
+ this.resizeFunction = this._onResize.bind(this);
this.options = {};
this.defaultOptions = {
@@ -21901,7 +21902,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.resizeTimer = setInterval(function () {
_this2.setSize();_this2.body.emitter.emit('_requestRedraw');
}, 1000);
- util.addEventListener(window, 'resize', this._onResize);
+ this.resizeFunction = this._onResize.bind(this);
+ util.addEventListener(window, 'resize', this.resizeFunction);
}
}
}, {
@@ -21911,7 +21913,8 @@ return /******/ (function(modules) { // webpackBootstrap
if (this.resizeTimer !== undefined) {
clearInterval(this.resizeTimer);
}
- util.removeEventListener(window, 'resize', this._onResize);
+ util.removeEventListener(window, 'resize', this.resizeFunction);
+ this.resizeFunction = undefined;
}
}, {
key: '_onResize',
diff --git a/docs/network/configure.html b/docs/network/configure.html
index 035f9465..b3547668 100644
--- a/docs/network/configure.html
+++ b/docs/network/configure.html
@@ -87,23 +87,30 @@
Options
The options for the canvas have to be contained in an object titled 'configure'.
- Click on the options shown to show how these options are supposed to be used.
+ Click on the full options or shorthand options to show how these options are supposed to be used.
-
+
+// these are all options in full.
var options = {
- configure:{
- filter: 'nodes, physics', // or ['nodes','physics'] or true
- container: document.getElementById("configDiv")
+ configure: {
+ enabled: true,
+ filter: 'nodes,edges',
+ container: undefined
}
}
-// alternative:
+network.setOptions(options);
+
+
+
+// only the options that have shorthand notations are shown.
var options = {
- configure: 'nodes, physics', // or ['nodes','physics'] or true
+ configure: 'nodes,edges'
}
network.setOptions(options);
@@ -122,7 +129,7 @@ network.setOptions(options);
enabled |
Boolean |
true |
-
+ | Toggle the configuration interface on or off. This is an optional parameter. If left undefined and any of the other properties of this object are defined, this will be set to true.
|
diff --git a/docs/network/manipulation.html b/docs/network/manipulation.html
index 2c0f083b..76c1ccab 100644
--- a/docs/network/manipulation.html
+++ b/docs/network/manipulation.html
@@ -88,22 +88,12 @@ var options = {
initiallyActive: false,
locale: 'en',
locales: locales,
- functionality: {
- addNode: true,
- addEdge: true,
- editNode: true,
- editEdge: true,
- deleteNode: true,
- deleteEdge: true
- },
- handlerFunctions: {
- addNode: undefined,
- addEdge: undefined,
- editNode: undefined,
- editEdge: undefined,
- deleteNode: undefined,
- deleteEdge: undefined
- },
+ addNode: true,
+ addEdge: true,
+ editNode: undefined,
+ editEdge: true,
+ deleteNode: true,
+ deleteEdge: true,
controlNodeStyle:{
// all node options are valid.
}
diff --git a/docs/network/physics.html b/docs/network/physics.html
index 71c978ef..a59d2769 100644
--- a/docs/network/physics.html
+++ b/docs/network/physics.html
@@ -70,7 +70,7 @@
Network - physics
-
Handles the HTML part of the canvas.
+
Handles the physics simulation, moving the nodes and edges to show them clearly.
Options
The options for the physics have to be contained in an object titled 'physics'.
diff --git a/lib/network/modules/Canvas.js b/lib/network/modules/Canvas.js
index 90bb18ea..347a7300 100644
--- a/lib/network/modules/Canvas.js
+++ b/lib/network/modules/Canvas.js
@@ -15,6 +15,7 @@ class Canvas {
this.body = body;
this.pixelRatio = 1;
this.resizeTimer = undefined;
+ this.resizeFunction = this._onResize.bind(this);
this.options = {};
this.defaultOptions = {
@@ -56,7 +57,8 @@ class Canvas {
// automatically adapt to a changing size of the browser.
this._cleanUp();
this.resizeTimer = setInterval(() => {this.setSize(); this.body.emitter.emit("_requestRedraw");}, 1000);
- util.addEventListener(window,'resize',this._onResize);
+ this.resizeFunction = this._onResize.bind(this);
+ util.addEventListener(window,'resize',this.resizeFunction);
}
}
@@ -65,7 +67,8 @@ class Canvas {
if (this.resizeTimer !== undefined) {
clearInterval(this.resizeTimer);
}
- util.removeEventListener(window,'resize',this._onResize);
+ util.removeEventListener(window,'resize',this.resizeFunction);
+ this.resizeFunction = undefined;
}
_onResize() {