Thanx for the dynamic edges, it is really useful. For now, it works only for layouts that do not depend on the presence of edges to compute the node layouts. Will it be possible to extend this mechanism to include layouts that need edges too?
For example, we could include a selector to get edges of a node and the selector is used to layout and display dynamic edges.  
Hence, this mechanism will be more generic.

What do you think?

This is something that is easily achievable. The real question, in my opinion, is: do we want to have such mechanism reflected in the API?

You can define the edges, then remove them. 

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

view interaction 
dynamicEdge: [ :model | model subclasses ]
using: (ROLine red).

view shape rectangle size: 8.
view nodes: (Collection withAllSubclasses).
edges := view edgesFrom: #superclass.
view treeLayout.
edges do: #remove.

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

I am so happy with the Athens-based rendering that I cannot resist to add a screenshot. Thanks Igor to produce the VM that is easy to download.


Cheers,
Alexandre




On Sun, Apr 7, 2013 at 2:07 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!

Having edges that show up when you enter a node is a recurrent need.
I have worked on some easy way to make this possible.

Using the Roassal low level api:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view rawView el1 el2 el3 |
rawView := ROView new.
rawView add: (el1 := ROBox element size: 20).
rawView add: (el2 := ROBox element size: 20).
rawView add: (el3 := ROBox element size: 20).
ROCircleLayout on: (Array with: el1 with: el2 with: el3).

el1 @ RODraggable.
el2 @ RODraggable.
el3 @ RODraggable.

el1 @ (RODynamicEdge toAll: (Array with: el2 with: el3) using: (ROLine arrowed color: Color red)).

rawView open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Screenshot:
<Screen Shot 2013-04-07 at 1.24.25 AM.png>


Using the Mondrian builder:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view interaction 
dynamicEdge: [ :model | (Array with: 10 with: 20 with: 30) copyWithout: model ]
using: (ROLine arrowed color: Color red).

view shape rectangle size: 20.
view nodes: (Array with: 10 with: 20 with: 30).
view circleLayout.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre


On Feb 6, 2013, at 9:18 AM, Usman Bhatti <usman.bhatti@gmail.com> wrote:

Hello Martin,

Here is a script that did work for me in the past.

|view|
view := ROMondrianViewBuilder new.
       
 
        view interaction on: ROMouseEnter do: [ :event |
                                view shape line color: Color blue.
view edgesFrom: [ :i | i // 2 ].
view raw signalUpdate.
                           
                        ].
view interaction on: ROMouseLeave do: [:event |
view raw allElementsDo: [ :el | el isEdge ifTrue: [el remove] ].
view raw signalUpdate].

 view shape rectangle size: 20.
 view nodes: (1 to: 20).
 
        view gridLayout.
        view open

 I tried in the newest Roassal and it does not work (edges are not removed from the canvas). So, if you want to see it in action, you can do so with Roassal 1.147, which corresponds to (ConfigurationOfRoassal project version: '1.148') load. 

I'll have a look into what broke this feature in latest Roassal.

Usman


On Tue, Feb 5, 2013 at 7:27 PM, Martin Dias <tinchodias@gmail.com> wrote:
Hello,

I have some nodes on a view, and I would like that on ROMouseEnter,
some edges are shown, and on ROMouseLeave they disappear.

My code is a bit complex, but I can recreate the scenario in a script
if you need.

Best regards,
Martin
_______________________________________________
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

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.