How do you do it? Because I do not have the code of roassal at hand?
The layout needs to have all the information available: node location node size window / canvas size
Now don't we need to know the level of details
the node location and size is easy: ROElement new position; extent
The window and canvas size can be accessed from the layout, however I discourage to do this. Instead, the window and canvas size should be provided as parameters to the layout. If you face a situation where this is not obvious, then we should see how to address this.
Cheers, Alexandre
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@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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev