From 8ed439ec1e1807ab22a7d5e82c8793665648b92c Mon Sep 17 00:00:00 2001 From: "Maurits van Riezen (mousetail)" Date: Thu, 14 Mar 2024 18:14:59 +0100 Subject: [PATCH] fix svg drawing to use full width --- src/scripts/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + "";