[Sugar-devel] [Karma] reason for KLayer
Felipe López Toledo
zer.subzero at gmail.com
Mon Sep 7 12:39:57 EDT 2009
>
> It seems that it would be nice to add these layers in k.init
> just like we add sounds and images. I think the way that u add sounds
> and images is very intuitive. It would be nice to use the same mechanism
> for the layers as well.
>
> then it would look like
> k.init ( ......
> layers : [
> { id: "inline1", canvas:"inlineCanvas1"},
> {id:"inline2", canvas:"inlineCanvas2"},
> {id:"card1", width:250, height:250}
> ]
>
> sounds :
>
> images :
>
> )
>
I like your idea, it's a initializing method
then it would be nice to iterate thru the layers w/ similar syntax to
> iterating thru the images or sounds
>
> $.each(library.layers, function ....);
>
> I realize I can now iterate thru the layers w/
>
> $.each(layers, function ...);
>
> but perhaps it would be easier to remember as library.layers because
> that is how we also access the sounds and images.
>
> What u think?
>
mm, I'm not so sure
I think the library should contain only objects that can be instantiated,
ie. the library should store the "original" object, then, you could
instantiate several copies of it, I don't see how to instantiate several
klayers
2009/9/4 Bryan Berry <bryan at olenepal.org>
> i have been looking at the method for adding layers --
>
> k.layer( {id:"inline1", canvas:"inlineCanvas1"} );
> k.layer( {id:"inline2", canvas:"inlineCanvas2"} );
> k.layer( {id:"card1", width:250, height:250} );
> k.layer( {id:"card2", width:250, height:250} );
> k.layer( {id:"card3", width:250, height:250} );
>
> It seems that it would be nice to add these layers in k.init
> just like we add sounds and images. I think the way that u add sounds
> and images is very intuitive. It would be nice to use the same mechanism
> for the layers as well.
>
> then it would look like
> k.init ( ......
> layers : [
> { id: "inline1", canvas:"inlineCanvas1"},
> {id:"inline2", canvas:"inlineCanvas2"},
> {id:"card1", width:250, height:250}
> ]
>
> sounds :
>
> images :
>
> )
>
> then it would be nice to iterate thru the layers w/ similar syntax to
> iterating thru the images or sounds
>
> $.each(library.layers, function ....);
>
> I realize I can now iterate thru the layers w/
>
> $.each(layers, function ...);
>
> but perhaps it would be easier to remember as library.layers because
> that is how we also access the sounds and images.
>
> What u think?
>
> --
> 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/20090907/1b635843/attachment.htm
More information about the Sugar-devel
mailing list