Skip to content

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
kinimesi committed Jun 18, 2018
2 parents 6d12b9f + d7dea4a commit 5ad2f0b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 169 deletions.
20 changes: 12 additions & 8 deletions cytoscape-expand-collapse.js

Large diffs are not rendered by default.

154 changes: 0 additions & 154 deletions npm-debug.log

This file was deleted.

12 changes: 6 additions & 6 deletions src/elementUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ function elementUtilities(cy) {
return {
moveNodes: function (positionDiff, nodes, notCalcTopMostNodes) {
var topMostNodes = notCalcTopMostNodes ? nodes : this.getTopMostNodes(nodes);
topMostNodes.positions(function(ele, i){
return {
x: topMostNodes[i].position("x") + positionDiff.x,
y: topMostNodes[i].position("y") + positionDiff.y
};
});
for (var i = 0; i < topMostNodes.length; i++) {
var node = topMostNodes[i];
var oldX = node.position("x");
var oldY = node.position("y");
node.position({
x: oldX + positionDiff.x,
y: oldY + positionDiff.y
});
var children = node.children();
this.moveNodes(positionDiff, children, true);
}
Expand Down
5 changes: 4 additions & 1 deletion src/expandCollapseUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ return {
* Moves the node by moving its descandents. Movement is animated if both single and animate flags are truthy.
*/
fishEyeViewMoveNode: function (node, T_x, T_y, nodeToExpand, single, animate, layoutBy) {
var childrenList = node.children(":visible");
var childrenList = cy.collection();
if(node.isParent()){
childrenList = node.children(":visible");
}
var self = this;

/*
Expand Down

0 comments on commit 5ad2f0b

Please sign in to comment.