Roassal temporary edges

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal temporary edges

tinchodias
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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

Usman Bhatti
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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

abergel
Martin, was this mail helpful?

Cheers,
Alexandre


On Feb 6, 2013, at 9:18 AM, Usman Bhatti <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

tinchodias
Hi Alexandre,

Yes, it was. I continued the discussion by private with Usman, and
also with Vanessa.

But actually, I wrote an example that is not working. It's not showing
any edge and I can't understand why. I attached it. Probably you can
discover the problem in a second.

Thank you!

Martin

On Sat, Feb 9, 2013 at 6:46 PM, Alexandre Bergel
<[hidden email]> wrote:

> Martin, was this mail helpful?
>
> Cheers,
> Alexandre
>
>
> On Feb 6, 2013, at 9:18 AM, Usman Bhatti <[hidden email]> 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 <[hidden email]> 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
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

temporaryEdgesExample.ws (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

abergel
Hi Martin,

Here a new example (which is also available by executing "ROMondrianExample new temporaryEdges")

We will include this example in the chapter. This is a recurrent problem.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view addedEdges wrongDependencies classes inheritanceLinks |
view := ROMondrianViewBuilder new.

"My classes"
classes := #('Object' 'Model' 'Database' 'Car').
"My inheritance links"
inheritanceLinks :=
        Array with: 'Object' -> 'Model'
                        with: 'Object' -> 'Database'
                        with: 'Model' -> 'Car'.
"My wrong dependencies"
wrongDependencies :=
        Array with: 'Object' -> 'Database'
                with: 'Car' -> 'Database'.

"Showing some (fake) dependencies"
addedEdges := nil.
view interaction on: ROMouseEnter do: [ :event |
        view shape arrowedLineWithOffset: 0.5; color: Color red.
        addedEdges :=
                view edgesFromAssociations:
                        wrongDependencies.
        view raw signalUpdate.
].

view interaction on: ROMouseLeave do: [ :event |
        addedEdges ifNotNil: [
                addedEdges do: #remove.
                addedEdges := nil.
                view raw signalUpdate. ].
].

"My system is made of 4 classes"
view shape rectangle withText.
view nodes: classes.

"Showing UML like diagram"
view shape arrowedLineReversed.
view edgesFromAssociations:
        inheritanceLinks.
                       
view treeLayout.
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Cheers,
Alexandre


On Feb 11, 2013, at 7:40 AM, Martin Dias <[hidden email]> wrote:

> Hi Alexandre,
>
> Yes, it was. I continued the discussion by private with Usman, and
> also with Vanessa.
>
> But actually, I wrote an example that is not working. It's not showing
> any edge and I can't understand why. I attached it. Probably you can
> discover the problem in a second.
>
> Thank you!
>
> Martin
>
> On Sat, Feb 9, 2013 at 6:46 PM, Alexandre Bergel
> <[hidden email]> wrote:
>> Martin, was this mail helpful?
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Feb 6, 2013, at 9:18 AM, Usman Bhatti <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> <temporaryEdgesExample.ws>_______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

abergel
In reply to this post by Usman Bhatti
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:


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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

stephane ducasse
Cool

Copy and paste the code in a new section of the Roassal Chapter

On Apr 7, 2013, at 2:07 PM, Alexandre Bergel <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

Usman Bhatti
In reply to this post by abergel
Alex,

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?

usman


On Sun, Apr 7, 2013 at 2:07 PM, Alexandre Bergel <[hidden email]> 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:


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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal temporary edges

abergel
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev