I have a canvas element with dimensions of 979X482px and I\'d like to have it stretch to fit the width of any given browser window, keeping the aspect ratio of width/hight 1
All the previous answers are great, but they won't scale all the images drawn on the canvas proportionally with the new canvas size. If you're using kinetic, I've made a function here = http://www.andy-howard.com/how-to-resize-kinetic-canvas-and-maintain-the-aspect-ratio/