Browse Source

altered treeconstruction to fix #71

css_transitions
Alex de Mulder 10 years ago
parent
commit
8eb974b799
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      dist/vis.js
  2. +1
    -1
      src/graph/graphMixins/physics/BarnesHut.js

+ 1
- 1
dist/vis.js View File

@ -12287,6 +12287,7 @@ var barnesHutMixin = {
mass:0, mass:0,
range: {minX:centerX-halfRootSize,maxX:centerX+halfRootSize, range: {minX:centerX-halfRootSize,maxX:centerX+halfRootSize,
minY:centerY-halfRootSize,maxY:centerY+halfRootSize}, minY:centerY-halfRootSize,maxY:centerY+halfRootSize},
size: rootSize, size: rootSize,
calcSize: 1 / rootSize, calcSize: 1 / rootSize,
children: {data:null}, children: {data:null},
@ -12363,7 +12364,6 @@ var barnesHutMixin = {
parentBranch.children[region].children.data.y == node.y) { parentBranch.children[region].children.data.y == node.y) {
node.x += Math.random(); node.x += Math.random();
node.y += Math.random(); node.y += Math.random();
this._placeInTree(parentBranch,node, true);
} }
else { else {
this._splitBranch(parentBranch.children[region]); this._splitBranch(parentBranch.children[region]);

+ 1
- 1
src/graph/graphMixins/physics/BarnesHut.js View File

@ -133,6 +133,7 @@ var barnesHutMixin = {
mass:0, mass:0,
range: {minX:centerX-halfRootSize,maxX:centerX+halfRootSize, range: {minX:centerX-halfRootSize,maxX:centerX+halfRootSize,
minY:centerY-halfRootSize,maxY:centerY+halfRootSize}, minY:centerY-halfRootSize,maxY:centerY+halfRootSize},
size: rootSize, size: rootSize,
calcSize: 1 / rootSize, calcSize: 1 / rootSize,
children: {data:null}, children: {data:null},
@ -209,7 +210,6 @@ var barnesHutMixin = {
parentBranch.children[region].children.data.y == node.y) { parentBranch.children[region].children.data.y == node.y) {
node.x += Math.random(); node.x += Math.random();
node.y += Math.random(); node.y += Math.random();
this._placeInTree(parentBranch,node, true);
} }
else { else {
this._splitBranch(parentBranch.children[region]); this._splitBranch(parentBranch.children[region]);

Loading…
Cancel
Save