fix: drawTime + canvasHeight
This commit is contained in:
parent
c29d032027
commit
53d6ef04b8
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ const initialSettings = {
|
||||||
export function MicroRepl({
|
export function MicroRepl({
|
||||||
code,
|
code,
|
||||||
hideHeader = false,
|
hideHeader = false,
|
||||||
canvasHeight = 200,
|
canvasHeight = 100,
|
||||||
onTrigger,
|
onTrigger,
|
||||||
onPaint,
|
onPaint,
|
||||||
punchcard,
|
punchcard,
|
||||||
|
|
@ -35,7 +35,7 @@ export function MicroRepl({
|
||||||
const shouldDraw = !!punchcard;
|
const shouldDraw = !!punchcard;
|
||||||
|
|
||||||
const init = useCallback(({ code, shouldDraw }) => {
|
const init = useCallback(({ code, shouldDraw }) => {
|
||||||
const drawTime = [-2, 2];
|
const drawTime = [0, 4];
|
||||||
const drawContext = shouldDraw ? document.querySelector('#' + canvasId)?.getContext('2d') : null;
|
const drawContext = shouldDraw ? document.querySelector('#' + canvasId)?.getContext('2d') : null;
|
||||||
let onDraw;
|
let onDraw;
|
||||||
if (shouldDraw) {
|
if (shouldDraw) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue