|  | @ -188,6 +188,7 @@ class LayoutEngine { | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | // if less than half of the nodes have a predefined position we continue |  |  | // if less than half of the nodes have a predefined position we continue | 
														
													
														
															
																|  |  | if (positionDefined < 0.5 * this.body.nodeIndices.length) { |  |  | if (positionDefined < 0.5 * this.body.nodeIndices.length) { | 
														
													
														
															
																|  |  |  |  |  | let MAX_LEVELS = 200; | 
														
													
														
															
																|  |  | let levels = 0; |  |  | let levels = 0; | 
														
													
														
															
																|  |  | let clusterThreshold = 100; |  |  | let clusterThreshold = 100; | 
														
													
														
															
																|  |  | // if there are a lot of nodes, we cluster before we run the algorithm. |  |  | // if there are a lot of nodes, we cluster before we run the algorithm. | 
														
													
												
													
														
															
																|  | @ -204,7 +205,7 @@ class LayoutEngine { | 
														
													
														
															
																|  |  | this.body.modules.clustering.clusterOutliers(); |  |  | this.body.modules.clustering.clusterOutliers(); | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | let after = this.body.nodeIndices.length; |  |  | let after = this.body.nodeIndices.length; | 
														
													
														
															
																|  |  | if (before == after && levels % 3 !== 0) { |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if ((before == after && levels % 3 !== 0) || levels > MAX_LEVELS) { | 
														
													
														
															
																|  |  | this._declusterAll(); |  |  | this._declusterAll(); | 
														
													
														
															
																|  |  | console.info("This network could not be positioned by this version of the improved layout algorithm."); |  |  | console.info("This network could not be positioned by this version of the improved layout algorithm."); | 
														
													
														
															
																|  |  | return; |  |  | return; | 
														
													
												
													
														
															
																|  |  |