We are discussing about redesigning the layout hierarchy I understand, not a particular layout. In that case, an area needs to be provided I imagine. Because you may want to have an infinite (both in x or y) of the space where you want to layout the nodes. The layout itself cannot be know this. For example, you may wish to do a grid layout where area can be infinite horizontally and/or vertically. The camera or window size do not know about this.
Not sure whether this is clear or not. Maybe we could have a skype session? Today? in 1 hour?
Alexandre
On May 15, 2013, at 2:57 PM, stephane ducasse stephane.ducasse@free.fr wrote:
On May 15, 2013, at 5:21 PM, Juraj Kubelka Juraj.Kubelka@gmail.com wrote:
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.
but how? are you saying that the end user should write
self treeLayout: camera windowSize?
I imagine that the layout should not depend on the camera position but it should depend on the total canvas size. So how do we get it? realExtent?
Stef
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@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
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