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 <tinchodias(a)gmail.com> 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
<alexandre.bergel(a)me.com> wrote:
Martin, was this mail helpful?
Cheers,
Alexandre
On Feb 6, 2013, at 9:18 AM, Usman Bhatti <usman.bhatti(a)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(a)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(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
<temporaryEdgesExample.ws>_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.