Skip to content

Commit

Permalink
fix svg drawing to use full width
Browse files Browse the repository at this point in the history
  • Loading branch information
mousetail committed Mar 14, 2024
1 parent b40b1c4 commit 8ed439e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="' + svg.getAttribute('viewBox')
+ '">' + svg.innerHTML + "</svg>";

Expand Down

0 comments on commit 8ed439e

Please sign in to comment.