autoplay and reset cps on default
This commit is contained in:
parent
b1d49552ae
commit
961e931c31
2 changed files with 10 additions and 5 deletions
|
|
@ -164,11 +164,12 @@ export function Repl({ embedded = false }) {
|
|||
};
|
||||
|
||||
const handleUpdate = async (patternData, reset = false) => {
|
||||
if (reset) {
|
||||
await resetEditor();
|
||||
}
|
||||
setViewingPatternData(patternData);
|
||||
editorRef.current.setCode(patternData.code);
|
||||
if (reset) {
|
||||
await resetEditor();
|
||||
handleEvaluate();
|
||||
}
|
||||
};
|
||||
|
||||
const handleEvaluate = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue