Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadialTreeLayout should translate the graph #938

Closed
seandenigris opened this issue Aug 3, 2015 · 10 comments
Closed

RadialTreeLayout should translate the graph #938

seandenigris opened this issue Aug 3, 2015 · 10 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 938

Try this:
view nodes: (Collection withAllSubclasses).
view edgesFrom: #superclass.
view radialTreeLayout. 


The center of the graph is placed at 0@0, and this is annoying because you do not see
half of the graph. The layout should translate the graph to make it start at 0@0

Reported by tudor@tudorgirba.com on 2013-05-13 10:03:49

@seandenigris
Copy link
Contributor Author

This should not belong to the layout I have the impression. Where to position the camera
against the nodes the view contains is the real question in my opinion. Probably that
the other layout are not doing it in the right way. 

I have added ROFocusView class>>centerView:
The Mondrian builder has been updated accordingly.
For example:
-=-=-=-=-=-=-=-=-=
view nodes: (Collection withAllSubclasses).
view edgesFrom: #superclass.
view radialTreeLayout.
view center.   
-=-=-=-=-=-=-=-=-=

produces what is expected.

In Roassal 1.356.
Doru, if you agree with this, then close the issue.

Reported by alexandre.bergel on 2013-05-14 22:37:10

  • Status changed: Started

@seandenigris
Copy link
Contributor Author

I think the ability to center the view is nice, but it does not solve the layout problem.

The layout positions nodes. So, there is no reason why the layout should not start
positioning nodes at 0@0. And there is no reason for the default camera to not start
at 0@0.

Or am I wrong?

Reported by tudor@tudorgirba.com on 2013-05-31 05:31:35

@seandenigris
Copy link
Contributor Author

Any taker? :)

Reported by tudor@tudorgirba.com on 2013-07-01 05:26:46

@seandenigris
Copy link
Contributor Author

Actually, I think the radial tree layout does the right think.  0 @ 0 should be at the
middle of the window. No reason to have it top left corner. 
The way layouts are implemented, prevent them from being composed (e.g., there is no
easy way to layout a tree with a root node that is not in 0 @ 0).

Reported by alexandre.bergel on 2013-07-01 15:06:19

@seandenigris
Copy link
Contributor Author

I do not get it. I am talking about the user, not the internal implementation.

I apply the layout, and two thirds of the graph cannot be seen. How is that the right
thing?

The only thing that would be required would be to perform a translation of the whole
graph (or maybe only of the camera) after the layout algorithm finished. This would
be a linear algorithm depending on the number of nodes.

Reported by tudor@tudorgirba.com on 2013-07-01 15:20:25

@seandenigris
Copy link
Contributor Author

Ping? :)

Reported by tudor@tudorgirba.com on 2013-07-07 15:58:56

@seandenigris
Copy link
Contributor Author

Mathieu and I are working on this... We will need a few days more...

Reported by alexandre.bergel on 2013-07-10 15:08:07

@seandenigris
Copy link
Contributor Author

Sorry to have been that slow on this.

| rawView nodes edges |
rawView := ROView new.

nodes := (ROEllipse gray size: 10) elementsOn: Collection withAllSubclasses.

nodes do: [ :n | n @ RODraggable ].

rawView addAll: nodes.

edges := ROLine buildEdgesFromElements: nodes from: #superclass to: #yourself.

rawView addAll: edges. 

RORadialTreeLayout new 
    "translator: (ROSmoothLayoutTranslator new nbCycles: 10);"
    applyOn: nodes.
rawView openInWindowSized: 1000 @ 600. 

Reported by alexandre.bergel on 2013-10-21 13:18:46

  • Status changed: Fixed

@seandenigris
Copy link
Contributor Author

Forgot to say this is now fixed in Roassal 1.458

Reported by alexandre.bergel on 2013-10-21 13:26:16

@seandenigris
Copy link
Contributor Author

Great!

Reported by tudor@tudorgirba.com on 2013-10-21 17:07:41

  • Labels added: Milestone-4.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant