i have a simple html5 page with a canvas element at a certain size. now i want that the canvas element always scales with the available size from the page but still keeps a certain aspect ratio.
also how can i get the current scale factor of the canvas element in javascript code?
thanks!