| Summary: | Graph Layout should not modiy heights of nodes | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alex Boyko <aboyko> | ||||||||
| Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> | ||||||||
| Status: | RESOLVED INVALID | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ahunter.eclipse, hudsonr | ||||||||
| Version: | 3.4 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Alex Boyko
Created attachment 91437 [details]
Proposed patch (draft)
This is the patch, where layout algorithm doesn't modify nodes height.
Description of changes:
I'm passing hi-metric coordinates and dimensions of nodes and edges to the layout. 1 pixel = 26 himetric units. The diagrams are huge, so the numbers layout algorithm operates with are large. A couple of overflows happened. Overflows are fixed in:
Geometry
Point
The 10000 constant didn't seem enough in RouteEdges, so graph width is used for DirectedGraph, CompoundDirectedGraph has a 0 width and still uses 10000 constant. Also added support for routing edges orthogonally (i.e. edge consists of horizontal and vertical line segments only)
Modified:
RouteEdges
Introduced SpaceOutEdges visitor to layout edges coming out from a short node (i.e. node's height < rank's height)
The rest of the changes are made to support nodes with unmodified height and SpaceOutEdges visitor.
Examples:
DirectedGraph: fourLevelOrthogonalBinaryTree, variousHeightNodesGraph_Test
CompoundDirectedGraph: flowChartOrthogonalEdges, variousHeightNodesGraph
Randy, could you please take a look at this and provide feedback?
Thanks in advance.
Created attachment 91531 [details]
cprrected patch
Corrected the patch
Created attachment 91537 [details]
patch
Previous patch had RelativeBendpoint fix included in it. This is the patch for this issue only
The existing behavior should be preserved for existing code that uses it. Doesn't the patch change the behavior by default for everyone? It does change the behavior for everyone. Nodes sizes won't be affected only the the x and y. I think I'll mark this as invalid since even if i make an option for not changing nodes sizes in Draw2D and route edges appropriately I will still have to route edges in GMF because I'm trying to assign distinct end points for edges as well as introduce BorderNode (there are border items in GMF) on the GMF side. I'd put that in GMF for now and move it to Draw2D if it works out fine BTW, I'll think about putting all my layout inhacements for GMF in Draw2D. It's just that I don't really know what's the best way to do that yet. Marked as invalid. This is to be done in GMF for now and will be put in Draw2D at a later time |