From 6cdb11b3f7b5b5ac8f8e93a833ee3350ecbcc404 Mon Sep 17 00:00:00 2001 From: Matt <1825086+asterixslashstar@users.noreply.github.com> Date: Fri, 9 Nov 2018 16:56:13 -0500 Subject: [PATCH] Allow setting of animation duration --- cytoscape-expand-collapse.js | 4 ++-- src/expandCollapseUtilities.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cytoscape-expand-collapse.js b/cytoscape-expand-collapse.js index 77629da..73e11aa 100644 --- a/cytoscape-expand-collapse.js +++ b/cytoscape-expand-collapse.js @@ -953,7 +953,7 @@ return { commonExpandOperation(node, applyFishEyeView, single, animate, layoutBy); } }, { - duration: 1000 + duration: animate > 1 ? animate : 1000 }); } else { @@ -1175,7 +1175,7 @@ return { } }, { - duration: 1000 + duration: animate > 1 ? animate : 1000 }); } } diff --git a/src/expandCollapseUtilities.js b/src/expandCollapseUtilities.js index 8042d74..3c90b06 100644 --- a/src/expandCollapseUtilities.js +++ b/src/expandCollapseUtilities.js @@ -276,7 +276,7 @@ return { commonExpandOperation(node, applyFishEyeView, single, animate, layoutBy); } }, { - duration: 1000 + duration: animate > 1 ? animate : 1000 }); } else { @@ -498,7 +498,7 @@ return { } }, { - duration: 1000 + duration: animate > 1 ? animate : 1000 }); } }