cytoscape-fcose
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "cytoscape-fcose", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "The fCoSE layout for Cytoscape.js by Bilkent with fast compound node placement", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-fcose.js", |
@@ -176,3 +176,3 @@ /* | ||
let childrenOfCurrentNode = cy.collection(); | ||
childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants()); | ||
childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles)); | ||
visitedTopMostNodes.push(currentNode); | ||
@@ -179,0 +179,0 @@ |
@@ -99,6 +99,2 @@ /** | ||
// if there is no elements, return | ||
if(options.eles.length == 0) | ||
return; | ||
// decide component packing is enabled or not | ||
@@ -113,21 +109,2 @@ let layUtil; | ||
} | ||
// if partial layout, update options.eles | ||
if(options.eles.length != options.cy.elements().length){ | ||
let prevNodes = eles.nodes(); | ||
eles = eles.union(eles.descendants()); | ||
eles.forEach(function(ele){ | ||
if(ele.isNode()){ | ||
let connectedEdges = ele.connectedEdges(); | ||
connectedEdges.forEach(function(edge){ | ||
if(eles.contains(edge.source()) && eles.contains(edge.target()) && !prevNodes.contains(edge.source().union(edge.target()))){ | ||
eles = eles.union(edge); | ||
} | ||
}); | ||
} | ||
}); | ||
options.eles = eles; | ||
} | ||
@@ -134,0 +111,0 @@ // if packing is not enabled, perform layout on the whole graph |
@@ -294,3 +294,3 @@ /** | ||
parentNodes.forEach(function( ele ){ | ||
aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants()), dummyNodes); | ||
aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes); | ||
}); | ||
@@ -297,0 +297,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4816141
3453