[Sugar-devel] [Karma] reason for KLayer

Felipe López Toledo zer.subzero at gmail.com
Fri Sep 4 03:09:33 EDT 2009


>
> what i really like from KLayer is to save me from having write all this
> code like here:
>
>
> http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/multicanvas/examples/adding_up_to_10/js/lesson.js#line23
>
> initializing all the canvas and context objects
>
yep, less typing

I have added some things to KLayer:
+ inline canvas support (canvas parameter)
+ addEventListener shortcut
+ removeEventListener shortcut

please try:
http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/raw/dff6d37e805be1e956378e592389dfdaeabf236d/examples/adding_up_to_10/index_multiple.html

the first and the second canvases are created inline

cheers

2009/9/3 Bryan Berry <bryan at olenepal.org>

> what i really like from KLayer is to save me from having write all this
> code like here:
>
>
> http://git.sugarlabs.org/projects/karma/repos/mainline/blobs/multicanvas/examples/adding_up_to_10/js/lesson.js#line23
>
> initializing all the canvas and context objects
>
> I like how your initialization of the imgs and sounds saves a lot of
> typing. It would be nice to do that for the canvas and context objs as
> well by abstracting them into the higher level KLayer object
>
> --
> Bryan W. Berry
> Technology Director
> OLE Nepal, http://www.olenepal.org
>
>


-- 
Felipe López Toledo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090904/99eb3e5e/attachment.htm 


More information about the Sugar-devel mailing list