Browse Source

- fixed minor bugs

flowchartTest
Alex de Mulder 9 years ago
parent
commit
a1d4b27ef3
4 changed files with 31749 additions and 31766 deletions
  1. +31737
    -31745
      dist/vis.js
  2. +10
    -18
      lib/network/Network.js
  3. +1
    -2
      lib/network/modules/NodesHandler.js
  4. +1
    -1
      test/network_unittests.html

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


+ 10
- 18
lib/network/Network.js View File

@ -58,19 +58,11 @@ function Network(container, data, options) {
// containers for nodes and edges
this.body = {
container: container,
nodes: {},
nodeIndices: [],
edges: {},
edgeIndices: [],
data: {
nodes: null, // A DataSet or DataView
edges: null // A DataSet or DataView
},
functions: {
createNode: function() {},
createEdge: function() {},
getPointer: function() {}
},
emitter: {
on: this.on.bind(this),
off: this.off.bind(this),
@ -91,7 +83,15 @@ function Network(container, data, options) {
onRelease: function() {},
onContext: function() {}
},
container: container,
data: {
nodes: null, // A DataSet or DataView
edges: null // A DataSet or DataView
},
functions: {
createNode: function() {},
createEdge: function() {},
getPointer: function() {}
},
view: {
scale: 1,
translation: {x: 0, y: 0}
@ -362,14 +362,6 @@ Network.prototype.destroy = function () {
delete this.configurator;
delete this.images;
// delete emitter bindings
delete this.body.emitter.emit;
delete this.body.emitter.on;
delete this.body.emitter.off;
delete this.body.emitter.once;
delete this.body.emitter;
for (var nodeId in this.body.nodes) {
delete this.body.nodes[nodeId];
}

+ 1
- 2
lib/network/modules/NodesHandler.js View File

@ -247,11 +247,10 @@ class NodesHandler {
else {
dataChanged = true;
// create node
node = this.create(properties);
node = this.create(data);
nodes[id] = node;
}
}
if (dataChanged === true) {
this.body.emitter.emit("_dataChanged");
}

+ 1
- 1
test/network_unittests.html View File

@ -117,7 +117,7 @@
{name:"deleteSelected", arguments: null, funcFirst:drawQuick},
{name:"disableEditMode", arguments: null},
{name:"getPositions", arguments: [[1]]},
{name:"storePositions", arguments: null},
{name:"storePositions", arguments: null, funcFirst:drawQuick},
{name:"getBoundingBox", arguments: [1]},
{name:"getConnectedNodes", arguments: [1]},
{name:"getConnectedEdges", arguments: [1]},

Loading…
Cancel
Save