From aaa1ea0c37f290690f071e8a31c9cc380e35f44f Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Sun, 3 Mar 2024 01:25:29 +1100 Subject: [PATCH] Minor changes --- client/src/components/inspector/ViewTree.tsx | 2 +- client/src/layers/trace/index.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/inspector/ViewTree.tsx b/client/src/components/inspector/ViewTree.tsx index a4d7bb5b..06ff54eb 100644 --- a/client/src/components/inspector/ViewTree.tsx +++ b/client/src/components/inspector/ViewTree.tsx @@ -1,6 +1,6 @@ import Split, { SplitDirection } from "@devbookhq/splitter"; import { DragIndicatorOutlined } from "@mui/icons-material"; -import { Box, alpha, useTheme } from "@mui/material"; +import { Box, useTheme } from "@mui/material"; import { Flex } from "components/generic/Flex"; import _, { filter, diff --git a/client/src/layers/trace/index.tsx b/client/src/layers/trace/index.tsx index 600732e9..93904685 100644 --- a/client/src/layers/trace/index.tsx +++ b/client/src/layers/trace/index.tsx @@ -351,10 +351,11 @@ function use2DPath(layer?: TraceLayer, index: number = 0, step: number = 0) { const { palette } = useTheme(); const { getPath } = useMemo( () => + layer?.source?.playback !== "playing" && layer?.source?.parsedTrace?.content ? makePathIndex(layer.source.parsedTrace.content) : { getParent: constant(undefined), getPath: constant([]) }, - [layer?.source?.parsedTrace?.content] + [layer?.source?.parsedTrace?.content, layer?.source?.playback] ); const element = useMemo(() => { if (layer?.source?.parsedTrace?.content?.render?.path) {