hide-header magic comment

This commit is contained in:
Felix Roos
2022-06-30 16:49:24 +02:00
parent 31d0225341
commit 85d3d7392e
4 changed files with 125 additions and 118 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -351,6 +351,7 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
}
}, [activeCode, onDrawProp]);
const hideHeader = useMemo(() => activeCode && activeCode.includes('strudel hide-header'), [activeCode]);
// cycle hook to control scheduling
const cycle = useCycle({
onDraw,
@@ -449,6 +450,7 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
};
return {
hideHeader,
pending,
code,
setCode,
+2
View File
@@ -36,6 +36,7 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
}
}, [activeCode, onDrawProp]);
const hideHeader = useMemo(() => activeCode && activeCode.includes('strudel hide-header'), [activeCode]);
// cycle hook to control scheduling
const cycle = useCycle({
onDraw,
@@ -136,6 +137,7 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw: onDrawP
};
return {
hideHeader,
pending,
code,
setCode,