[Sugar-devel] Web activities canvas element

laurent bernabe laurent.bernabe at gmail.com
Wed Oct 9 18:42:59 EDT 2013


Thanks,

I'll watch at ClockWeb activity.

Regards


2013/10/10 Manuel Quiñones <manuq at laptop.org>

> 2013/10/9 laurent bernabe <laurent.bernabe at 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 ..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131010/4ac075c1/attachment-0001.html>


More information about the Sugar-devel mailing list