diff --git a/src/scripts/main.ts b/src/scripts/main.ts index c3f6829..bdbb704 100644 --- a/src/scripts/main.ts +++ b/src/scripts/main.ts @@ -271,7 +271,7 @@ start_button.addEventListener( ) function generateBackgroundImage() { - let svg = path_drawer.gen_svg(program_state.program[0].length, program_state.program.length); + let svg = path_drawer.gen_svg(program_state.program.map(i=>i.length).reduce((a,b)=>Math.max(a,b)), program_state.program.length); let svg_source = '' + svg.innerHTML + "";