Browse Source

updated jdocs

fixDataView
Alex de Mulder 9 years ago
parent
commit
24aa86020e
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      lib/network/modules/LayoutEngine.js

+ 7
- 3
lib/network/modules/LayoutEngine.js View File

@ -526,8 +526,13 @@ class LayoutEngine {
this._setMinLevelToZero(); this._setMinLevelToZero();
} }
/**
* Small util method to set the minimum levels of the nodes to zero.
* @private
*/
_setMinLevelToZero() { _setMinLevelToZero() {
let minLevel;
let minLevel = 1e9;
// get the minimum level // get the minimum level
for (let nodeId in this.body.nodes) { for (let nodeId in this.body.nodes) {
if (this.body.nodes.hasOwnProperty(nodeId)) { if (this.body.nodes.hasOwnProperty(nodeId)) {
@ -619,13 +624,12 @@ class LayoutEngine {
* This is a recursively called function to enumerate the branches from the largest hubs and place the nodes * This is a recursively called function to enumerate the branches from the largest hubs and place the nodes
* on a X position that ensures there will be no overlap. * on a X position that ensures there will be no overlap.
* *
* @param edges
* @param parentId * @param parentId
* @param distribution
* @param parentLevel * @param parentLevel
* @private * @private
*/ */
_placeBranchNodes(parentId, parentLevel) { _placeBranchNodes(parentId, parentLevel) {
// if this is not a parent, cancel the placing. This can happen with multiple parents to one child.
if (this.hierarchicalParents[parentId] === undefined) { if (this.hierarchicalParents[parentId] === undefined) {
return; return;
} }

Loading…
Cancel
Save