Skip to content

Commit

Permalink
Partially fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanbalci committed Sep 10, 2019
1 parent 91fcd1c commit e2e7e10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions cytoscape-expand-collapse.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/undoRedoUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ module.exports = function (cy, api) {
var actions = ["collapse", "collapseRecursively", "collapseAll", "expand", "expandRecursively", "expandAll"];

for (var i = 0; i < actions.length; i++) {
ur.action(actions[i], doIt(actions[i]), doIt(actions[(i + 3) % 6]));
if(i == 2)
ur.action("collapseAll", doIt("collapseAll"), doIt("expandRecursively"));
else if(i == 5)
ur.action("expandAll", doIt("expandAll"), doIt("collapseRecursively"));
else
ur.action(actions[i], doIt(actions[i]), doIt(actions[(i + 3) % 6]));
}

};

0 comments on commit e2e7e10

Please sign in to comment.