diff options
Diffstat (limited to 'pages/index.tsx')
-rw-r--r-- | pages/index.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index 5bcbe94..23a8f5c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -803,13 +803,13 @@ export const Graph = function (props: GraphProps) { const [opacity, setOpacity] = useState<number>(1) const [fadeIn, cancel] = useAnimation((x) => setOpacity(x), { duration: physics.animationSpeed, - algorithm: physics.algorithms[physics.algorithmName], + algorithm: physics.algorithms[physics.algorithmName] ?? Easing.Cubic.InOut, }) const [fadeOut, fadeOutCancel] = useAnimation( (x) => setOpacity(Math.min(opacity, -1 * (x - 1))), { duration: physics.animationSpeed, - algorithm: physics.algorithms[physics.algorithmName], + algorithm: physics.algorithms[physics.algorithmName] ?? Easing.Cubic.InOut, }, ) @@ -1000,10 +1000,7 @@ export const Graph = function (props: GraphProps) { if (!physics.hover) { return } - const timer = setTimeout(() => { - setHoverNode(node) - }, 30) - return () => clearTimeout(timer) + setHoverNode(node) }, } |