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 }); } }