Closed seandenigris closed 9 years ago
Uploaded better image.
Reported by benjamin.t.coman
on 2012-04-09 15:15:20
This is a bit presumptuous without knowing Mondrian better architecturally, but I can't
help thinking that some of the methods named 'forNode' would be more appropriately
named 'forNodeValue' - particularly for interaction such as
registerForEvent:forNode:updateNode:updateLayout:. Having tried tracing this down
further, the root cause is that the "node that is clicked" is not operated on directly.
Instead the "value" of the clicked node searched from root. Where the same value
occurs multiple times in a graph, a different node might be found for "that value"
to apply the operation to rather than the "node that was clicked".
Instead I expect to be able to apply operations to the actual node that I selected.
Here is another example...
----8<-----
view nodes: (1 to: 5) forEach:
[:each |
view interaction strongHighlightWhenOver: [ :v | v ].
view shape rectangle withText; size: 20.
view nodes: (1 to: each).
view gridLayout
].
----8<-----
Executing this in Mondrian Easel (taking for example the third group) small squares
1 & 2 do not highlight when hovering over them, and hovering over small square 3 highlights
the large square rather than its small square.
I can get what I consider the usually expected behaviour by modifying MOAnnouncer>>registerForEvent:forNodes:updateShape:updateLayout:
replacing...
domainNodes := (aBlockOrSymbol moValue: ann element model).
nodes := ann viewRenderer nodeForDomainValues: domainNodes.
by...
nodes := OrderedCollection new add: ann element ; yourself.
I can see where you might want all graph nodes having the same value to highlight when
any one is selected, for which a method registerForEvent:forNodeValues: might be appropriate.
It is however not clear to me whether the 'node' in the forNodes is referring to a
node in the model or a node in the display. I am presuming the latter - particularly
in relation to interactions.
Reported by benjamin.t.coman
on 2012-04-15 08:25:54
Most of the mechanisms to update nodes in Mondrian are a kind of hack. As soon as you
have two or more nodes with the same model, then the interaction will simply not work.
Regarding your suggestion for for the class MOAnnouncer, it does not have the same
effect. It turns some tests yellow.
I turn this issue WontFix because it simply cannot be fixed.
Roassal provides a simpler model for building interactive visualization, especially
with node update.
Reported by alexandre.bergel
on 2012-04-15 23:49:40
WontFix
Originally reported on Google Code with ID 790
Reported by
benjamin.t.coman
on 2012-04-09 07:36:37