Hi!
Today I refactored my Roassal script and the visualization is looking good (Thanks Vanessa :)
I've another question for you guys, though.
Concerning the interaction of my view, I can drag all groups of nodes and, when highlighted, a node automatically highlights the referenced nodes (i.e., the nodes reachable from an edge originated by the highlighted node), and inner nodes (i.e., days) have a popupText showing additional info.
Of course, I'm using 'view interaction forwarder .' to forward all the events from the inner nodes to the outer node but I've a problem.
On the days (i.e., the core of the calendar) I need both to forward the ROMouseDragging, ROMouseEnter, and ROMouseLeave but do not forward the click events, since I've a menu on the nodes (i.e., view interaction item: 'Inspect day' action: [ :el | el model inspect ]).
Instead of using the forwarder, I did the following:
view forward: ROMouseDragging . view forward: ROMouseEnter . view forward: ROMouseLeave .
Everything works correctly but the popupText for those inner nodes (since it's triggered by ROMouseEnter and ROMouseLeave events).
Is there any way to both forward an event and also trigger it on the node itself?
Cheers and thanks in advance, Roberto
On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya van.c.pena@gmail.com wrote:
Hi Roberto,
I don't understand, do you still need the names of the week? If you do, you can follow the same idea and add something like this between the 'month name' and 'days' node:
view shape rectangleWithoutBorder . view interaction forwarder. view node: 'days names' forIt:[ view shape label. view interaction forwarder. view nodes: #('Sun' 'Mon' 'Tues' 'Wed' 'Thu' 'Fri' 'Sat'). ].
For now the text does not zoom, but it is in the TODO list :)
Vanessa.
On 12/07/2012 01:41 PM, roberto.minelli@usi.ch wrote:
Hi Vanessa,
On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya van.c.pena@gmail.com wrote:
Hi Roberto,
If I understood correctly, I was thinking of something like this:
Yes, I did almost the same thing except that I need another header under the month name containing names of the week days.
Thanks for the answers! :) I have another question ;) is there any way to have the text (i.e., label) zoomed together with the shapes?
view nodes: (1 to: 12) forEach: [:n | view shape label. view interaction forwarder. view node: 'Month name'. view shape rectangleWithoutBorder . view interaction forwarder. view node: 'days' forIt:[ view shape label. view interaction forwarder. view nodes: (1 to: 30). view gridLayout. ]. view verticalLineLayout . ]. view gridLayout .
This is having a node for the header a node for the days. For the interaction, using "interaction forwarder" I think makes what you want. Does this work for you?
Yep. I already solved that issue with the 'forwarder'. Thank you anyway.
Cheers, Roberto
Vanessa.
On 12/07/2012 05:55 AM, roberto.minelli@usi.ch wrote:
Hi,
It's me again! ;) I'm building a calendar visualization inspired by http://www.xconomy.com/wordpress/wp-content/images/2012/11/skeuo-calendar.pn....
Each node of visualization will be a month that contains:
- An header (with (a) the name of the month and (b) the headers for the columns containing 'Mon' 'Tue' 'Wed' etc.)
- Inner nodes for the days
I created such visualization without the headers and now I'm wondering which is the clearer solution to add them.
As I wrote in the previous mail, I'm using nodes:forEach: to generate the visualization with inner nodes.
The first solution that came to my mind is to nest another nodes:forEach to draw the headers. Let me explain:
view nodes: months forEach: [ :month | … headers := OrderedCollection with: month name . headers addAll: #('Sun' 'Mon' 'Tue' 'Wed' 'Thu' 'Fri' 'Sat' ).
view nodes: headers forFirst: [ :header | 'The first header is an instance of the Month class, which is used as a key in the Dictionary that represents my data.' 'Thus I use that to recover the days for the current month from the dictionary'
days := myData at: header. view nodes: days.
] ]
Notice that nodes:forFirst: is a message I implemented that works like nodes:forEach: but only considers the first node of nodes and attaches the inner nodes only to that element.
I feel this solution is a bit of a hack. How would you do it in a cleaner way?
Another question concerns drag & drop. I set my inner nodes (i.e, days) to be not draggable since I do not want the user to drag them, but I want the user to be able to drag the entire shape representing a month (i.e., outer node). As an effect to drag the month you should explicitly start the dragging from the outer node but this is counter intuitive. I'd like to be able to drag the month also from its inner nodes (days).
Is there a way to propagate the interaction and from the inner nodes I can drag the container shape? ____
Thanks in advance, Roberto
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev