04-29-2012 04:16 PM
Hi all ,
I was just wondering if there is a way to set the html5canvas to full screen ?.
Right now i am doing it with the following code
g_canvas.setAttribute("width", $(window).width() - 20); g_canvas.setAttribute("height", $(window).height() - 20);
but the problems i am facing with this is :
In ripple and emulators it works perfectly fine , but when i loaded the program in an acual black berry ..
it works fine in portrait mode ... but when i flip it to landscape mode ... its bigger than the acuall viewport size .. thats cause the $(window).width() is updated correctly but the height remains same ... am i missing some thing ?
i have the following meta tag too.
thanks for any help.
05-07-2012 10:17 AM
One way of doing this is with the window.orientation object. Demo here: