Skip to content

Commit

Permalink
Removed unnecessary batch
Browse files Browse the repository at this point in the history
  • Loading branch information
kinimesi committed Aug 25, 2017
1 parent 30c2bff commit 4fce8a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions cytoscape-expand-collapse.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/expandCollapseUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return {
if (!node._private.data.collapsedChildren){
return;
}
cy.startBatch();

//check how the position of the node is changed
var positionDiff = {
x: node._private.position.x - node._private.data['position-before-collapse'].x,
Expand All @@ -34,8 +34,6 @@ return {
elementUtilities.moveNodes(positionDiff, node.children());
node.removeData('position-before-collapse');

cy.endBatch();

node.trigger("position"); // position not triggered by default when nodes are moved

// If expand is called just for one node then call end operation to perform layout
Expand Down

0 comments on commit 4fce8a3

Please sign in to comment.