|
@ -197,7 +197,7 @@ class LayoutEngine { |
|
|
let MAX_LEVELS = 10; |
|
|
let MAX_LEVELS = 10; |
|
|
let level = 0; |
|
|
let level = 0; |
|
|
let clusterThreshold = 150; |
|
|
let clusterThreshold = 150; |
|
|
//Performance enhancement, cluster edges need only be simpel straight lines
|
|
|
|
|
|
|
|
|
//Performance enhancement, during clustering edges need only be simple straight lines. These options don't propagate outside the clustering phase.
|
|
|
let clusterOptions = { |
|
|
let clusterOptions = { |
|
|
clusterEdgeProperties:{ |
|
|
clusterEdgeProperties:{ |
|
|
smooth: { |
|
|
smooth: { |
|
@ -215,11 +215,9 @@ class LayoutEngine { |
|
|
let before = this.body.nodeIndices.length; |
|
|
let before = this.body.nodeIndices.length; |
|
|
// if there are many nodes we do a hubsize cluster
|
|
|
// if there are many nodes we do a hubsize cluster
|
|
|
if (level % 3 === 0) { |
|
|
if (level % 3 === 0) { |
|
|
console.log("bridges"); |
|
|
|
|
|
this.body.modules.clustering.clusterBridges(clusterOptions); |
|
|
this.body.modules.clustering.clusterBridges(clusterOptions); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
console.log("outliers"); |
|
|
|
|
|
this.body.modules.clustering.clusterOutliers(clusterOptions); |
|
|
this.body.modules.clustering.clusterOutliers(clusterOptions); |
|
|
} |
|
|
} |
|
|
let after = this.body.nodeIndices.length; |
|
|
let after = this.body.nodeIndices.length; |
|
|