<div dir="ltr">I've solved my problem by integrating JQuery, thanks to the Shim section of RequireJS, and by calling it in activity.js<div><br></div><div>=> loader.js</div><div><br></div><div>__________________________________</div>
<div><div>shim: {</div><div> ...</div><div> jquery: {</div><div> exports: 'jquery'</div><div> }</div><div> },</div><div> paths: {</div><div> ...</div><div> jquery: 'jquery'</div>
<div> }</div></div><div>__________________________________</div><div><br></div><div><br></div><div>activity.js</div><div><br></div><div>______________________________</div><div>...</div><div>var $ = require('jquery');</div>
<div>...</div><div><div>var canvas = doc.getElementById('gameZone'), // gameZone is a canvas element inside the canvas dim, without any dimension set</div><div> stage = new createjs.Stage(canvas),</div>
<div> toolbar_height = $('.toolbar').height(),</div><div> win_dim = new Array($(window).width(), $(window).height()),</div><div> gameZone_dim = new Array(win_dim[0], win_dim[1]-toolbar_height);</div>
<div> </div><div> $("#canvas").css("overflow", "hidden");</div><div> $("#gameZone").width(gameZone_dim[0]);</div><div> $("#gameZone").height(gameZone_dim[1]);</div>
</div><div>_______________________________</div><div><br></div><div>Regards.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-01-26 laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>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.</div>
<div>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)</div><div><br></div><div>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.</div>
<div><br></div><div>Could someone point me to a good article/tutorial :</div><div><ul><li>in order to fetch a css property (Maybe should I add minified JQuery to the libs, so that it can be easier) ?</li><li>in order to compute screen size ?</li>
</ul><div>Regards</div></div></div>
</blockquote></div><br></div>