2013/10/9 laurent bernabe <laurent.bern...@gmail.com>:
> Hello,
>
> *) I am wondering whether I can safely replace, in an index.html file of a
> web activity, the <div id="canvas></div> with <canvas id="canvas"></canvas>
> ?
>
> Because the library I am using need a real canvas element.

You just put your <canvas> inside that <div>.

> *) Also, if I can use a real canvas element, how can set its size to the
> remaining size of the screen ? (As my laptop has a wider screen than XO
> ones).

It's possible by connecting to the window resize event in JS.  You can
see an example in Clock Web activity.

https://github.com/manuq/clock-web
http://manuq.github.io/clock-web/

-- 
.. manuq ..
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to