[Sugar-devel] WebActivity : Resizing a canvas object to the screen size ?
laurent.bernabe at gmail.com
Sun Jan 26 05:58:17 EST 2014
Some times ago, I've asked how to deal with the fact that my laptop screen
size is rather 16/9 than a 4/3 size. And I was, among other advises,
advised to adapt the game size to the screen size.
I am conviced that it the way to do : but how to get the client size from
inside my activity.js ? (Client size : I mean, in the height dimension,
when we remove the toolbar, of course)
Indeed, this involve computing the toolbar height, which is different for
each version of the activity css file, and of course the whole screen size.
But, for both task, I don't know how to do.
Could someone point me to a good article/tutorial :
- in order to fetch a css property (Maybe should I add minified JQuery
to the libs, so that it can be easier) ?
- in order to compute screen size ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel