Need to figure out how to resize a HTML5 Canvas element #1

Closed
paulrenenichols opened this Issue Mar 25, 2013 · 1 comment

Projects

None yet

1 participant

@paulrenenichols
Owner

Can't seem to figure out how to resize a Canvas element.

This code seems to disable canvas drawing:

canvas.attr('width', gameBoardWidth);
canvas.attr('height', gameBoardWidth);

@paulrenenichols
Owner

I can't tell exactly when I figured it out, but canvas.attr('width', width) seems to work for resizing.

Also note, that the canvas object is a jQuery object, so this is not a standard browser call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment