yes sure to iterate through all objects of the whiteboard:

for (var i=0;i<canvas._drawarea.subviews.length;i++) {

}

BUT

1) There are two lists of objects:
canvas._drawarea.subviews
canvas._drawarea.baseactionobjectList

*baseactionobjectList* is the *virtual list of object* that is synced with
the server side (cause on java side there is a 1:1 copy of that list to make
sure whenever a client leaves and returns he can sync against the server
side list).

To iterate through the virtual list on client side:
for (var i=0;i<canvas._drawarea.baseactionobjectList.length;i++) {

}

BUT:
Have a look inside baseDraw.lzx ... there are already some methods to get
items.
for example getBaseObjectByName(objName) et cetera

Also make sure you understand the master pattern of the objects inside
baseactionobjectList ...
for example
baseactionobjectList contains a lot of objects (lets call them
*actionobject*).
For example:
actionObject[0] = 'ellipse';
        actionObject[1] = stroke;
        actionObject[2] = line;
        actionObject[3] = fill;
        actionObject[4] = strokeDis;
        actionObject[5] = fillDis;
        actionObject[6] = this.currentellipseOpacity;
        actionObject[7] = zIndex;//-8
        actionObject[8] = swfObj;//-7
        actionObject[9] = this.counter;//-6
        actionObject[10] = x;//-5
        actionObject[11] = y;//-4
        actionObject[12] = width;//-3
        actionObject[13] = height;//-2
        actionObject[14] = newName;//-1

So with actionObject[actionObject.length-1] you ALWAYs get the name of the
object,
and with
canvas._drawarea[actionObject[actionObject.length-1]]
you get a reference to the *visual* object ob the whiteboard.


And after all ... whenever you change the x,y,width,height whatever on
client side you need to populate that to the server-side list that all
clients sync against !


Sebastian

2010/10/6 Netbuilder <[email protected]>

> So please reply to my questions:
> is there a way to refer to all the objects (I mean the lines) at the
> same time?
> Is there a layer that contains every single object I draw?
> Thank you :)
>
>
>
>
>
> On Oct 6, 3:36 pm, "[email protected]" <[email protected]>
> wrote:
> > Hallo Netbuilder,
> >
> > I cannot see any *canvas._drawarea.getDisplayObject()._y*
> >
> > in that file. Also actually (except for that hack about x/yscale) you
> should
> > never use that, always use the setAttribute method to change the y value.
> >
> > Sebastian
> >
> > 2010/10/6 Netbuilder <[email protected]>
> >
> >
> >
> >
> >
> > > I'm becoming mad.. :((
> > > I'm in whiteboard/base/basedrawObject.lzx. I'm modifying  the method
> > > "remoteObjectUpdate".
> > > How can I refer to all the objects (I mean the lines) at the same
> > > time? I'd like to change their y property.
> >
> > > canvas._drawarea.getDisplayObject()._y is not correct because it
> > > change the property y of the whole windows (also the scrollbar goes up
> > > and down)
> > > Thank You.
> >
> > > [email protected] wrote:
> > > > no you need to calculate the current zoom based on the values:
> >
> > > > canvas._drawarea.getDisplayObject()._xscale
> > > > and
> > > > canvas._drawarea.getDisplayObject().width
> >
> > > > Sebastian
> >
> > > > 2010/10/2 Netbuilder <[email protected]>
> >
> > > > > Fantastic! it works!
> > > > > is there a global var to know the current zoom level (like
> > > > > canvas.zoomlevel)?
> > > > > Thank you
> >
> > > > > [email protected] wrote:
> > > > > > Hi Filippo,
> >
> > > > > > to build the zoom in/out function is very easy.
> >
> > > > > > <!--
> > > > > >  zoom Whiteboard
> > > > > >  z: % of zoom
> > > > > >  -->
> > > > > > <method name="zoomIt" args="z">
> > > > > >  canvas._drawarea.getDisplayObject()._xscale = z;
> > > > > >  canvas._drawarea.getDisplayObject()._yscale = z;
> > > > > > </method>
> >
> > > > > > Sebastian
> >
> > > > > $>
> > > > >  ¢
> > > > > > 2010/10/2 Netbuilder <[email protected]>
> >
> > > > > > > Hi again.
> > > > > > > Is there a sort of container (ie canvas._layers, ...) that
> contains
> > > > > > > all the object I see in each "this.currentlayer"?
> >
> > > > > > > I'm not yet able to understand where to find the structure of
> the
> > > > > > > project and I feel stupid. I'm sorry, but I have to build the
> zoom
> > > in
> > > > > > > and out of the whiteboard objects within 3 days.
> >
> > > > > > > Thank you a lot
> >
> > > > > > > --
> > > > > > > You received this message because you are subscribed to the
> Google
> > > > > Groups
> > > > > > > "OpenMeetings User" group.
> > > > > > > To post to this group, send email to> > >
> [email protected].
> > > > > > > To unsubscribe from this group, send email to> > > > >
> [email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>>>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> >
> >
> > > > > <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>>>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> >
> >
> > > > > > > .
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/openmeetings-user?hl=en.
> >
> > > > > > --
> > > > > > Sebastian Wagner
> > > > > >http://www.webbase-design.de
> > > > > >http://openmeetings.googlecode.com
> > > > > >http://www.wagner-sebastian.com
> > > > > $$> [email protected]¢¢
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "OpenMeetings User" group.
> > > > > To post to this group, send email to>
> [email protected].
> > > > > To unsubscribe from this group, send email to> > >
> [email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>>>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> >
> >
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/openmeetings-user?hl=en.
> >
> > > > --
> > > > Sebastian Wagner
> > > >http://www.webbase-design.de
> > > >http://openmeetings.googlecode.com
> > > >http://www.wagner-sebastian.com
> > > > [email protected]
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "OpenMeetings User" group.> To post to this group, send email
> [email protected].
> > > To unsubscribe from this group, send email to>
> [email protected]<openmeetings-user%[email protected]>
> <openmeetings-user%[email protected]<openmeetings-user%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/openmeetings-user?hl=en.
> >
> > --
> > Sebastian
> Wagnerhttp://www.webbase-design.dehttp://openmeetings.googlecode.comhttp://
> www.wagner-sebastian.com
> > [email protected]
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenMeetings User" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<openmeetings-user%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/openmeetings-user?hl=en.
>
>


-- 
Sebastian Wagner
http://www.webbase-design.de
http://openmeetings.googlecode.com
http://www.wagner-sebastian.com
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"OpenMeetings User" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-user?hl=en.

Reply via email to