The layout needs to have all the information available:
node location
ROElement>>position
node size
ROElement>>extent
ROElement>>bounds
> window / canvas size
ROCamera>>windowSize
ROCamera>>extent "it counts scale"
ROCamera>>realExtent
ROCamera>>scale
ROCamera>>position
ROLayout does not depends on an ROView or ROCamera. If you need it pass it
as an argument to your layout.
Cheers,
Jura
> Now don't we need to know the level of details
> > Hi Mathieu,
>
> > I am back from a short break. Back to
answering question, fixing bugs
> and addressing issues :-)
>
> > Well... the question is the layout
should really know about the camera?
> I like to think that the job of a layout is to properly locate nodes. In
> the case that the window size matters, then it should be provided to the
> layout as a parameter.
>
> > To position the layout in the middle
of a window, I have just added the
> necessary.
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > view nodes: (Collection withAllSubclasses).
> > view edgesFrom: #superclass.
> > view radialTreeLayout.
> > view center.
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> > Look at the implementer of #center to
see how ROFocusView
> class>>centerView: is called
>
> > Cheers,
> > Alexandre
>
>
> > On May 13, 2013, at 10:48 AM, mathieubmddehouck(a)mailoo.org wrote:
>
> >> Hi
> >
> >> I was
working on translating the center of the radial tree at the
> middle of the window and I faced a problem.
> >
> >> I had
already faced it when working on the ForceBasedLayout.
> >
> >
> >> How does the layout access to his
view to get informations ? (Basically
> it could be very useful to access to the camera to have size
> informations...)
> >
> >
> >> Regards
> >
> >>
Mathieu
> >
> >
> >>
_______________________________________________
> >> Moose-dev mailing list
> >> Moose-dev(a)iam.unibe.ch
> >>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > Alexandre Bergel
http://www.bergel.eu
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> >
_______________________________________________
> > Moose-dev mailing list
> > Moose-dev(a)iam.unibe.ch
> >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev