excellent!
I want to see that.

Stef

On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:

Hello


I've added new features for the force based layout.

You can change the gravity center, tell where you want to see your fixed nodes and so on.

I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.

 

Gofer it
    smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm';
    package: 'RoassalForceBaseLayout';
    load.

 

Try this :

---------------------------

"Preambule. It includes the initialization. "
| rawView view layout |
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
"enter your script below"
"-------------"
"-------------"

    view interaction on: ROMouseEnter do: [ :n |
        | nodes |
        nodes := view raw elementsFromModels: n element model allSubclasses.
        ROHighlightElements on: nodes ].

    view interaction on: ROMouseLeave do: [ :n |
        | nodes |
        nodes := view raw elementsFromModels: n element model allSubclasses.
        ROUnhighlightElements on: nodes  ].
    
    view shape rectangle size: 10.
    view nodes: (Collection withAllSubclasses).
    view edgesFrom: #superclass.
    
    layout := ROForceBasedLayout_N new.
    layout fix: (view nodes last) at: 450@450;
            gravityAt: 437@38 .
    
    view layout: layout.
    view applyLayout.

"-------------"
"-------------"
"Below is the initiation of the menu and opening the visualization"
ROEaselMorphic new populateMenuOn: view.
view open

---------------------------------------

 

Mathieu

 
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev