Hi
There is a new layout for packing rectangle nodes.
Gofer new
smalltalkhubUser: '' project: 'RoassalAlgorithm';
package:
'Roassal-New';
load
---------------------------------------------------------------------------------------------------
"Source code: ROMondrianExample>>miniMapOn:"
"Preambule. It includes
the initialization. "
| view rawView |
rawView := ROView new.
view :=
ROMondrianViewBuilder view: rawView.
"-------------"
"-------------"
view shape rectangle
width: [ :cls | cls numberOfVariables * 5 ];
height: #numberOfMethods;
color: (Color r: 0 g: 1 b: 1 ).
view nodes:
Collection withAllSubclasses.
"1 to: view nodes size by: 2 do: [ :ea
||i e| e := view nodes at: ea.
i := e width.
e width: e height.
e
height: i.
e extent: e width @ e height ] ."
view layout:((
RORectanglePacking new)ratioWidth: 2 height: 1; padding:
3).
"-------------"
"-------------"
"Below is the initiation of the
menu and opening the visualization"
ROEaselMorphic new populateMenuOn:
view.
view
open.
------------------------------------------------------------------------------------------------------
Try it and give me feedback, please.
Regards
Mathieu