Browse Source

Added a check so only one 'activator' overlay is created on clickToUse.

v3_develop
Alex de Mulder 9 years ago
parent
commit
d342e9482a
5 changed files with 6222 additions and 6205 deletions
  1. +3
    -0
      HISTORY.md
  2. +6205
    -6201
      dist/vis.js
  3. +7
    -1
      examples/network/02_random_nodes.html
  4. +4
    -2
      lib/network/Network.js
  5. +3
    -1
      lib/timeline/Core.js

+ 3
- 0
HISTORY.md View File

@ -11,6 +11,7 @@ http://visjs.org
- Improved destroy function, added them to the examples.
- Nodes now have bounding boxes that are used for zoomExtent.
- Made physics more stable (albeit a little slower).
- Added a check so only one 'activator' overlay is created on clickToUse.
- Made global color options for edges overrule the inheritColors.
### Graph2d
@ -18,11 +19,13 @@ http://visjs.org
- Fixed round-off errors of zero on the y-axis.
- added show major/minor lines options to dataAxis.
- Fixed adapting to width and height changes.
- Added a check so only one 'activator' overlay is created on clickToUse.
### Timeline
- Support for custom date formatting of the labels on the time axis.
- added show major/minor lines options to timeline.
- Added a check so only one 'activator' overlay is created on clickToUse.
### Graph3d

+ 6205
- 6201
dist/vis.js
File diff suppressed because it is too large
View File


+ 7
- 1
examples/network/02_random_nodes.html View File

@ -84,7 +84,7 @@
nodes: nodes,
edges: edges
};
var options = {stabilize:false};
var options = {stabilize:false, clickToUse:true};
network = new vis.Network(container, data, options);
// add event listeners
@ -97,6 +97,12 @@
network.on('startStabilization', function (params) {
document.getElementById('stabilization').innerHTML = 'Stabilizing...';
});
network.setData({
nodes: nodes,
edges: edges,
options: options
});
}

+ 4
- 2
lib/network/Network.js View File

@ -675,8 +675,10 @@ Network.prototype.setOptions = function (options) {
if ('clickToUse' in options) {
if (options.clickToUse) {
this.activator = new Activator(this.frame);
this.activator.on('change', this._createKeyBinds.bind(this));
if (!this.activator) {
this.activator = new Activator(this.frame);
this.activator.on('change', this._createKeyBinds.bind(this));
}
}
else {
if (this.activator) {

+ 3
- 1
lib/timeline/Core.js View File

@ -197,7 +197,9 @@ Core.prototype.setOptions = function (options) {
if ('clickToUse' in options) {
if (options.clickToUse) {
this.activator = new Activator(this.dom.root);
if (!this.activator) {
this.activator = new Activator(this.dom.root);
}
}
else {
if (this.activator) {

Loading…
Cancel
Save