hi Ben,
I believe the following script in Roassal does what you expect:
-=-=-=-=-=-=-=-=-=-=-=-=
| view |
view := ROMondrianViewBuilder new.
view nodes: (1 to: 5) forEach: [:each |
view interaction highlightNodesWhenOver: [ :node | {node} ].
view shape rectangle withText; size: 20.
view nodes: (1 to: each).
view gridLayout ].
view open
-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
On 8 Apr 2012, at 12:41, Ben Coman wrote:
I am trying to combine interactions with subviews in
Mondrian but it is not working as expected. This is with a fresh Moose 4.6 downloaded
today plus ConfigurationOfMondrian (AlexandreBergel.345) and [ ConfigurationOfMondrian
project lastVersion load ].
As a test case, from ( World > Moose > Mondrian Easel ) I combine:
Examples > interaction > variation in node size
Examples > subviews > simple
to produce the following 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<-----
However executing this in Mondrian Easel you will notice that (taking for example the
third group) hovering over small squares 1 & 2 does not highlight these and hovering
over small square 3 highlights the large square rather than its small square.
I get my expected/required behaviour by modifying MOAnnouncer>>registerForEvent:
forNodes: updateShape: updateLayout:
to replace...
domainNodes := (aBlockOrSymbol moValue: ann element model).
nodes := ann viewRenderer nodeForDomainValues: domainNodes.
by...
nodes := OrderedCollection new add: ann element ; yourself.
...but I don't know what else that breaks or another way to get my required
behaviour. How should I proceed?
cheers, -ben
_______________________________________________
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.