Refactor generator to prevent duplicate reloading

This commit is contained in:
Misode
2022-05-08 16:24:39 +02:00
parent 2772d967e0
commit a432479672
13 changed files with 78 additions and 75 deletions

View File

@@ -36,7 +36,7 @@ export const DensityFunctionPreview = ({ data, shown, version }: PreviewProps) =
onLeave() {
setFocused(undefined)
},
}, [state, seed])
}, [version, state, seed])
useEffect(() => {
if (scrollInterval.current) {
@@ -51,7 +51,7 @@ export const DensityFunctionPreview = ({ data, shown, version }: PreviewProps) =
}, 100) as any
}
}
}, [state, seed, shown, autoScroll])
}, [version, state, seed, shown, autoScroll])
return <>
<div class="controls preview-controls">