Question
How to make canvas fill browser window
Hi,
I'm trying to make HTML5 canvas fill the whole browser window, but keep all the elements the same size.
Of course, I tried responsive scaling options in Publish settings, but none of them could help me with that.
I need canvas to fill the whole window, but the elements should stay the same size (I'll reposition them as I need).
I took the tutorial by Joseph Labrecque, his third source file "Responsive repositioning of elements".
That's exactly what I'm trying to do, but his canvas doesn't fill the whole window.
I manually changed lib.properties in the .js file
lib.properties = {
id: 'E6A711C6D3714A758799092F7115FF77',
width: 700,
height: 188,
replaced width: 700 with window.innerWidth, and height: 188 with window.innerHeight
Here's the result, exactly what I'm looking for:
But when I resize the window, nothing happens, because standrad resposive scaling is disabled and if I turn it on, the canvas will be scaling with the ratio. How do I make the canvas to fill the whole browser window without scaling the elements? Any way to do that once (in .hmtl) without editing the .js file manually each time? When Adobe gonna realise that we need that option in Publish settings?
Thanks
