title: Keep original canvas aspect ratio when resize browser
body: <p>I have canvas with width: 100%; and height: 100%. It is fullscreen and I draw an image on it. I would like keep original aspect ratio of the image when I resize my browser. I would like the same effect as if I would do this: <a href="http://pastebin.com/pFEQJsvM" rel="nofollow">http://pastebin.com/pFEQJsvM</a> . Any ideas how can I achieve that? </p>
  
  <p>Here is my javscript code:
  <a href="http://pastebin.com/U5VpzfbZ" rel="nofollow">http://pastebin.com/U5VpzfbZ</a></p>
  
  <p>Thank you for your help!</p>