Browse Source

fixed support nodes not being cleaned after edges are removed. #213

v3_develop
Alex de Mulder 10 years ago
parent
commit
6a0144c6f1
2 changed files with 29951 additions and 29933 deletions
  1. +29940
    -29931
      dist/vis.js
  2. +11
    -2
      lib/network/Network.js

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


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

@ -532,7 +532,6 @@ Network.prototype.setData = function(data, disableStart) {
}
this._putDataInSector();
if (!disableStart) {
// find a stable position or start animating to a stable position
if (this.stabilize) {
@ -1779,7 +1778,7 @@ Network.prototype._redraw = function() {
this._doInAllSectors("_drawControlNodes",ctx);
}
// this._doInSupportSector("_drawNodes",ctx,true);
this._doInSupportSector("_drawNodes",ctx,true);
// this._drawTree(ctx,"#F00F0F");
// restore original scaling and translation
@ -2229,6 +2228,14 @@ Network.prototype._configureSmoothCurves = function(disableStart) {
}
if (this.constants.smoothCurves.enabled == true && this.constants.smoothCurves.dynamic == true) {
this._createBezierNodes();
// cleanup unused support nodes
for (var nodeId in this.sectors['support']['nodes']) {
if (this.sectors['support']['nodes'].hasOwnProperty(nodeId)) {
if (this.edges[this.sectors['support']['nodes'][nodeId]] === undefined) {
delete this.sectors['support']['nodes'][nodeId];
}
}
}
}
else {
// delete the support nodes
@ -2240,6 +2247,8 @@ Network.prototype._configureSmoothCurves = function(disableStart) {
}
}
}
this._updateCalculationNodes();
if (!disableStart) {
this.moving = true;

Loading…
Cancel
Save