This commit is contained in:
Felix Roos 2022-03-18 17:39:14 +01:00
parent 6691afb9b9
commit 8af4a92fc0
7 changed files with 44 additions and 30 deletions

View file

@ -47,6 +47,11 @@ function useRepl({tune, defaultSynth, autolink = true, onEvent, onDraw}) {
if (_events.length) {
}
};
onDraw = useMemo(() => {
if (activeCode && !activeCode.includes("strudel disable-highlighting")) {
return onDraw;
}
}, [activeCode]);
const cycle = useCycle({
onDraw,
onEvent: useCallback((time, event) => {