Hi Veronica,
I need to have more detail. I cannot reproduce the problem. How do you update the edges?
Consider the following example (you need to update Mondrian to see it working, I fixed a bug, which raised an exception). Just do it in an Easel:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Example on updating shape color. Moving the mouse about a node turn the edges to used classes red. "
| classes edges getDepOfAClass classesAndTheirOutgoingEdges |
"Return the list of classes that are dependent from aClass" getDepOfAClass := [ :aClass | | b | b := Set new. aClass methods do: [:m | b addAll: ((m allLiterals select: [:l | (l isKindOf: Association) and: [ l value isBehavior ]]) collect: #value) ]. b ].
"We select all the classes of Mondrian" classes := (Smalltalk globals select: #isBehavior) select: [:c | c name beginsWith: 'MO' ]. view shape rectangle width: #numberOfAttributes; height: #numberOfMethods. view interaction action: #inspect. view interaction on: MOMouseEnter do: [ :ann | (classesAndTheirOutgoingEdges at: ann model) do: [:e | e copyShapeAndDo: [:s | s color: Color red ]]. ]; on: MOMouseLeave do: [ :ann | (classesAndTheirOutgoingEdges at: ann model) do: [:e | e copyShapeAndDo: [:s | s color: Color lightGray ]]. ]. view nodes: classes.
view shape: (MOOrthoVerticalLineShape new color: Color black). edges := view edgesFrom: #superclass. view treeLayout userDefinedEdges: edges.
view shape line color: Color veryLightGray.
classesAndTheirOutgoingEdges := Dictionary new. classes do: [:cls | classesAndTheirOutgoingEdges at: cls put: (view edge: cls from: #yourself toAll: [:c | getDepOfAClass value: c ]) ]. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre
On 3 Dec 2011, at 17:46, Veronica Isabel Uquillas Gomez wrote:
Hi,
I have an inconvenient with the positions in which edges are being drawn. Attached a screenshot to explain what is happening.
My visualization displays at the beginning all the edges (grey), and then when interacting with a node, its edges change color. However, when drawing the edges in another color (green/red) some appear in a different location (see the red one). For me this creates confusion as it seems to be a different edge (i know that when drawing it's a different object but i think it should appear in the same location as most of them do).
I thought that it was related with the type of line (arrowed) but in fact the same happens with a simple line or in a different layout. This case in particular uses the dominance tree layout.
Now I am wondering if that is a bug of the layout or of the edge's drawing itself. And, if this can be fixed..
Best Regards, Veronica
<edges-positions.png>
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev