Browse Source

- Fixed findNode method. It now does not return internal objects anymore.

codeClimate
Alex de Mulder 8 years ago
parent
commit
34bd031888
4 changed files with 9 additions and 8 deletions
  1. +1
    -0
      HISTORY.md
  2. +2
    -2
      dist/vis.js
  3. +4
    -4
      examples/network/other/clustering.html
  4. +2
    -2
      lib/network/modules/Clustering.js

+ 1
- 0
HISTORY.md View File

@ -12,6 +12,7 @@ http://visjs.org
### Network
- Fixed #1531 , #1335: border distances for arrow positioning
- Fixed findNode method. It now does not return internal objects anymore.
## 2015-12-18, version 4.11.0

+ 2
- 2
dist/vis.js View File

@ -36479,11 +36479,11 @@ return /******/ (function(modules) { // webpackBootstrap
var counter = 0;
while (this.clusteredNodes[nodeId] !== undefined && counter < max) {
stack.push(this.clusteredNodes[nodeId].node);
stack.push(nodeId);
nodeId = this.clusteredNodes[nodeId].clusterId;
counter++;
}
stack.push(this.body.nodes[nodeId]);
stack.push(nodeId);
return stack;
}

+ 4
- 4
examples/network/other/clustering.html View File

@ -80,7 +80,7 @@ Click any of the buttons below to cluster the network. On every push the network
network.openCluster(params.nodes[0]);
}
}
})
});
function clusterByCid() {
network.setData(data);
@ -89,7 +89,7 @@ Click any of the buttons below to cluster the network. On every push the network
return childOptions.cid == 1;
},
clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'}
}
};
network.cluster(clusterOptionsByData);
}
function clusterByColor() {
@ -111,7 +111,7 @@ Click any of the buttons below to cluster the network. On every push the network
return clusterOptions;
},
clusterNodeProperties: {id: 'cluster:' + color, borderWidth: 3, shape: 'database', color:color, label:'color:' + color}
}
};
network.cluster(clusterOptionsByData);
}
}
@ -131,7 +131,7 @@ Click any of the buttons below to cluster the network. On every push the network
return clusterOptions;
},
clusterNodeProperties: {borderWidth:3, shape:'box', font:{size:30}}
}
};
network.clusterByHubsize(undefined, clusterOptionsByData);
}

+ 2
- 2
lib/network/modules/Clustering.js View File

@ -672,11 +672,11 @@ class ClusterEngine {
let counter = 0;
while (this.clusteredNodes[nodeId] !== undefined && counter < max) {
stack.push(this.clusteredNodes[nodeId].node);
stack.push(nodeId);
nodeId = this.clusteredNodes[nodeId].clusterId;
counter++;
}
stack.push(this.body.nodes[nodeId]);
stack.push(nodeId);
return stack;
}

Loading…
Cancel
Save