JS ustawił rozmiar płótna
canvas.width = 300;
// or, if you only have the context
ctx.canvas.width = 300;
just-saved-you-a-stackoverflow-visit
canvas.width = 300;
// or, if you only have the context
ctx.canvas.width = 300;