Created
September 24, 2014 06:57
-
-
Save greggman/7d9cf12b3cf174e5125e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resize() { | |
var width = canvas.clientWidth; | |
var height = canvas.clientHeight; | |
if (canvas.width != width || | |
canvas.height != height) { | |
canvas.width = width; | |
canvas.height = height; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment