[Roassal] Nested nodes and RODraggable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

[Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
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.png.

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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

Ben Coman
Concerning the second part, have a look at Roassal Easel > Example >
ROExample > basic > composing
and also
http://forum.world.st/selective-forwarding-of-ROMenuActivable-td4649729.html

(btw Alexandre, outter should be spelled with a single "t")

cheers -ben

[hidden email] 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.png.
>
> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>  

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
As easy as "view forward." :D

Thanks!

I'm looking forward to hear some suggestions on the first part ;)

Cheers,
Roberto

On Dec 7, 2012, at 10:39 AM, Ben Coman <[hidden email]>
 wrote:

> Concerning the second part, have a look at Roassal Easel > Example > ROExample > basic > composing
> and also http://forum.world.st/selective-forwarding-of-ROMenuActivable-td4649729.html
>
> (btw Alexandre, outter should be spelled with a single "t")
>
> cheers -ben
>
> [hidden email] 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.png.
>>
>> 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
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>  
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

vpena
In reply to this post by roberto.minelli@usi.ch
Hi Roberto,

If I understood correctly, I was thinking of something like this:

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?

Vanessa.

On 12/07/2012 05:55 AM, [hidden email] 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.png.
>
> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Hi Vanessa,

On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>
>> 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
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

vpena
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, [hidden email] wrote:

> Hi Vanessa,
>
> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>
>>> 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
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
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 <[hidden email]> 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, [hidden email] wrote:
>> Hi Vanessa,
>>
>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>
>>>> 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
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
Hi Roberto

> Is there any way to both forward an event and also trigger it on the node itself?

Are you referring to something like:
        view processAndForward: ROMouseClick.

Cheers,
Alexandre


NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!

>
> Cheers and thanks in advance,
> Roberto
>
>
> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>> Hi Vanessa,
>>>
>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>
>>>>> 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
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Yes! is there anything like that?

Cheers,
Roberto

On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Roberto
>
>> Is there any way to both forward an event and also trigger it on the node itself?
>
> Are you referring to something like:
> view processAndForward: ROMouseClick.
>
> Cheers,
> Alexandre
>
>
> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>
>>
>> Cheers and thanks in advance,
>> Roberto
>>
>>
>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>> Hi Vanessa,
>>>>
>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>
>>>>>> 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
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
Currently no, but this looks easy to do.
Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.

Cheers,
Alexandre


On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:

> Yes! is there anything like that?
>
> Cheers,
> Roberto
>
> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>
>> Hi Roberto
>>
>>> Is there any way to both forward an event and also trigger it on the node itself?
>>
>> Are you referring to something like:
>> view processAndForward: ROMouseClick.
>>
>> Cheers,
>> Alexandre
>>
>>
>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>
>>>
>>> Cheers and thanks in advance,
>>> Roberto
>>>
>>>
>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>> Hi Vanessa,
>>>>>
>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>
>>>>>>> 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
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Ok ;)

By the way I tried something like
       
selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].

But if only forwards the event..

At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)

Cheers,
Roberto


On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]>
 wrote:

> Currently no, but this looks easy to do.
> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>
> Cheers,
> Alexandre
>
>
> On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:
>
>> Yes! is there anything like that?
>>
>> Cheers,
>> Roberto
>>
>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Hi Roberto
>>>
>>>> Is there any way to both forward an event and also trigger it on the node itself?
>>>
>>> Are you referring to something like:
>>> view processAndForward: ROMouseClick.
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>>
>>>>
>>>> Cheers and thanks in advance,
>>>> Roberto
>>>>
>>>>
>>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>>> Hi Vanessa,
>>>>>>
>>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>>
>>>>>>>> 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
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
The class ROAnnouncer may have to be modified. I haven't closely look at it.
I will work on this asap.

Alexandre


On Dec 11, 2012, at 10:31 AM, "[hidden email]" <[hidden email]> wrote:

> Ok ;)
>
> By the way I tried something like
>
> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>
> But if only forwards the event..
>
> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>
> Cheers,
> Roberto
>
>
> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]>
> wrote:
>
>> Currently no, but this looks easy to do.
>> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:
>>
>>> Yes! is there anything like that?
>>>
>>> Cheers,
>>> Roberto
>>>
>>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> Hi Roberto
>>>>
>>>>> Is there any way to both forward an event and also trigger it on the node itself?
>>>>
>>>> Are you referring to something like:
>>>> view processAndForward: ROMouseClick.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>>>
>>>>>
>>>>> Cheers and thanks in advance,
>>>>> Roberto
>>>>>
>>>>>
>>>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>>>> Hi Vanessa,
>>>>>>>
>>>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>>>
>>>>>>>>> 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
>>>>>>>>> [hidden email]
>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Hi guys,

With the feedback and help I collected from you, I managed to build the visualization I described some days ago. Thanks ;)

Here is the preliminary result!

Cheers,
Roberto

[cid:24B3981A-6694-49B7-B608-6A92F38BB5E7@home]
On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:

The class ROAnnouncer may have to be modified. I haven't closely look at it.
I will work on this asap.

Alexandre


On Dec 11, 2012, at 10:31 AM, "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>> wrote:

Ok ;)

By the way I tried something like

selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].

But if only forwards the event..

At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)

Cheers,
Roberto


On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>>
wrote:

Currently no, but this looks easy to do.
Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.

Cheers,
Alexandre


On Dec 11, 2012, at 9:13 AM, [hidden email]<mailto:[hidden email]> wrote:

Yes! is there anything like that?

Cheers,
Roberto

On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:

Hi Roberto

Is there any way to both forward an event and also trigger it on the node itself?

Are you referring to something like:
view processAndForward: ROMouseClick.

Cheers,
Alexandre


NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!


Cheers and thanks in advance,
Roberto


On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> wrote:
Hi Vanessa,

On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> 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.png.

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
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]<mailto:[hidden email]>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

calendar.png (124K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

Tudor Girba-2
Pretty cool. Is the code available somewhere?

A couple of questions:
- from what I could read in your mails, you have built two layouts for the months and days. Why was the GridLayout not enough?
- Did you consider building your own shape for the month, instead of relying on putting together elements just for the visual appearance of a shape?

Cheers,
Doru


On 11 Dec 2012, at 19:58, "[hidden email]" <[hidden email]> wrote:

> Hi guys,
>
> With the feedback and help I collected from you, I managed to build the visualization I described some days ago. Thanks ;)
>
> Here is the preliminary result!
>
> Cheers,
> Roberto
>
> [cid:24B3981A-6694-49B7-B608-6A92F38BB5E7@home]
> On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>
> The class ROAnnouncer may have to be modified. I haven't closely look at it.
> I will work on this asap.
>
> Alexandre
>
>
> On Dec 11, 2012, at 10:31 AM, "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>> wrote:
>
> Ok ;)
>
> By the way I tried something like
>
> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>
> But if only forwards the event..
>
> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>
> Cheers,
> Roberto
>
>
> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>>
> wrote:
>
> Currently no, but this looks easy to do.
> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>
> Cheers,
> Alexandre
>
>
> On Dec 11, 2012, at 9:13 AM, [hidden email]<mailto:[hidden email]> wrote:
>
> Yes! is there anything like that?
>
> Cheers,
> Roberto
>
> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>
> Hi Roberto
>
> Is there any way to both forward an event and also trigger it on the node itself?
>
> Are you referring to something like:
> view processAndForward: ROMouseClick.
>
> Cheers,
> Alexandre
>
>
> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>
>
> Cheers and thanks in advance,
> Roberto
>
>
> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> wrote:
> Hi Vanessa,
>
> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> 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.png.
>
> 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
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving should be focused on describing
the problem in a way that makes the solution obvious."





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Hi Doru

Il giorno 11-dic-2012, alle ore 20:03, "Tudor Girba" <[hidden email]> ha scritto:

> Pretty cool.

Thx ;)

> Is the code available somewhere?

It's on SmalltalkHub.. But it needs to be refactored.. I focused more on achieving a result rather than design :) I can send you the repo link tomorrow eventually ;)

> A couple of questions:
> - from what I could read in your mails, you have built two layouts for the months and days.

I've built a layout for the month (that layouts the days) and one for the year (that layouts the monts). They are just a copy of the GridLayout with a different behavior for the doExecute message which the behavior of months and days. In practice the month layout aligns the first day of the month with the corresponding columns (i.e., each columns is a day: Mon, Tue, etc.). The year layout does the same for months.

In practice they inherit from the grid layout overriding the doExecute method.

> Why was the GridLayout not enough?

See above :)

> - Did you consider building your own shape for the month, instead of relying on putting together elements just for the visual appearance of a shape?

Interesting suggestion. I'll try that!

Thanks!

>
> Cheers,
> Doru

Cheers,
Roby

>
>
> On 11 Dec 2012, at 19:58, "[hidden email]" <[hidden email]> wrote:
>
>> Hi guys,
>>
>> With the feedback and help I collected from you, I managed to build the visualization I described some days ago. Thanks ;)
>>
>> Here is the preliminary result!
>>
>> Cheers,
>> Roberto
>>
>> [cid:24B3981A-6694-49B7-B608-6A92F38BB5E7@home]
>> On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>>
>> The class ROAnnouncer may have to be modified. I haven't closely look at it.
>> I will work on this asap.
>>
>> Alexandre
>>
>>
>> On Dec 11, 2012, at 10:31 AM, "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>> wrote:
>>
>> Ok ;)
>>
>> By the way I tried something like
>>
>> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>>
>> But if only forwards the event..
>>
>> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>>
>> Cheers,
>> Roberto
>>
>>
>> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>>
>> wrote:
>>
>> Currently no, but this looks easy to do.
>> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Dec 11, 2012, at 9:13 AM, [hidden email]<mailto:[hidden email]> wrote:
>>
>> Yes! is there anything like that?
>>
>> Cheers,
>> Roberto
>>
>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>>
>> Hi Roberto
>>
>> Is there any way to both forward an event and also trigger it on the node itself?
>>
>> Are you referring to something like:
>> view processAndForward: ROMouseClick.
>>
>> Cheers,
>> Alexandre
>>
>>
>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>
>>
>> Cheers and thanks in advance,
>> Roberto
>>
>>
>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> wrote:
>> Hi Vanessa,
>>
>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> 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.png.
>>
>> 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
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]<mailto:[hidden email]>
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Problem solving should be focused on describing
> the problem in a way that makes the solution obvious."
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
In reply to this post by roberto.minelli@usi.ch
>> Concerning the second part, have a look at Roassal Easel > Example > ROExample > basic > composing
>> and also http://forum.world.st/selective-forwarding-of-ROMenuActivable-td4649729.html
>>
>> (btw Alexandre, outter should be spelled with a single "t")

Thanks Ben!
In Roassal 1.224

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
In reply to this post by roberto.minelli@usi.ch
This is really cool Roberto.
Send us screenshot and a reference to your project once done.

Alexandre


On Dec 11, 2012, at 7:58 PM, [hidden email] wrote:

> Hi guys,
>
> With the feedback and help I collected from you, I managed to build the visualization I described some days ago. Thanks ;)
>
> Here is the preliminary result!
>
> Cheers,
> Roberto
>
> [cid:24B3981A-6694-49B7-B608-6A92F38BB5E7@home]
> On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>
> The class ROAnnouncer may have to be modified. I haven't closely look at it.
> I will work on this asap.
>
> Alexandre
>
>
> On Dec 11, 2012, at 10:31 AM, "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>> wrote:
>
> Ok ;)
>
> By the way I tried something like
>
> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>
> But if only forwards the event..
>
> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>
> Cheers,
> Roberto
>
>
> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>>
> wrote:
>
> Currently no, but this looks easy to do.
> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>
> Cheers,
> Alexandre
>
>
> On Dec 11, 2012, at 9:13 AM, [hidden email]<mailto:[hidden email]> wrote:
>
> Yes! is there anything like that?
>
> Cheers,
> Roberto
>
> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]<mailto:[hidden email]>> wrote:
>
> Hi Roberto
>
> Is there any way to both forward an event and also trigger it on the node itself?
>
> Are you referring to something like:
> view processAndForward: ROMouseClick.
>
> Cheers,
> Alexandre
>
>
> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>
>
> Cheers and thanks in advance,
> Roberto
>
>
> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> wrote:
> Hi Vanessa,
>
> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]<mailto:[hidden email]>> 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, [hidden email]<mailto:[hidden email]> 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.png.
>
> 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
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]<mailto:[hidden email]>
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
In reply to this post by abergel
Roberto, I had a look at what you have asked for. I have added the method ROEvent>>emitToParent

Here an example:

        | t spr sprInner |
        t := 0.
        spr := ROElement new.
        spr on: ROMouseEnter do: [ :evt | t := t + 10 ].
       
        sprInner := ROElement new.
        sprInner on: ROMouseEnter do: [ :evt | t := t + 1. evt emitToParent ].
        spr add: sprInner.
       
        sprInner announce: ROMouseEnter.
        self assert: t = 11.
       

Roassal 1.225 supports this.

Is this enough? I know this is not exactly the same than having processAndForward:, but I suspect it should enough in your case.
Can you confirm (or refute) this?

Cheers,
Alexandre


On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]> wrote:

> The class ROAnnouncer may have to be modified. I haven't closely look at it.
> I will work on this asap.
>
> Alexandre
>
>
> On Dec 11, 2012, at 10:31 AM, "[hidden email]" <[hidden email]> wrote:
>
>> Ok ;)
>>
>> By the way I tried something like
>>
>> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>>
>> But if only forwards the event..
>>
>> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>>
>> Cheers,
>> Roberto
>>
>>
>> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]>
>> wrote:
>>
>>> Currently no, but this looks easy to do.
>>> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>>>
>>> Cheers,
>>> Alexandre
>>>
>>>
>>> On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:
>>>
>>>> Yes! is there anything like that?
>>>>
>>>> Cheers,
>>>> Roberto
>>>>
>>>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>
>>>>> Hi Roberto
>>>>>
>>>>>> Is there any way to both forward an event and also trigger it on the node itself?
>>>>>
>>>>> Are you referring to something like:
>>>>> view processAndForward: ROMouseClick.
>>>>>
>>>>> Cheers,
>>>>> Alexandre
>>>>>
>>>>>
>>>>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>>>>
>>>>>>
>>>>>> Cheers and thanks in advance,
>>>>>> Roberto
>>>>>>
>>>>>>
>>>>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>>>>> Hi Vanessa,
>>>>>>>>
>>>>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>>>>>> [hidden email]
>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Moose-dev mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

roberto.minelli@usi.ch
Hi Alexandre,

On Dec 12, 2012, at 12:50 AM, Alexandre Bergel <[hidden email]> wrote:

> Roberto, I had a look at what you have asked for. I have added the method ROEvent>>emitToParent
>
> Here an example:
>
> | t spr sprInner |
> t := 0.
> spr := ROElement new.
> spr on: ROMouseEnter do: [ :evt | t := t + 10 ].
>
> sprInner := ROElement new.
> sprInner on: ROMouseEnter do: [ :evt | t := t + 1. evt emitToParent ].
> spr add: sprInner.
>
> sprInner announce: ROMouseEnter.
> self assert: t = 11.
>
>
> Roassal 1.225 supports this.
>
> Is this enough? I know this is not exactly the same than having processAndForward:, but I suspect it should enough in your case.
> Can you confirm (or refute) this?

Unfortunately I updated Roassal and I tried to generate my view but all the elements were out of layout (I think due to the zOrdering staff).

Do you know anything about it? All my labels were out of alignment and so I immediately reverted to the old Roassal. ;)

By the way I already solved the problem I had with the propagation of events ;)

>
> Cheers,
> Alexandre
>
>
> On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]> wrote:
>
>> The class ROAnnouncer may have to be modified. I haven't closely look at it.
>> I will work on this asap.
>>
>> Alexandre
>>
>>
>> On Dec 11, 2012, at 10:31 AM, "[hidden email]" <[hidden email]> wrote:
>>
>>> Ok ;)
>>>
>>> By the way I tried something like
>>>
>>> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>>>
>>> But if only forwards the event..
>>>
>>> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>>>
>>> Cheers,
>>> Roberto
>>>
>>>
>>> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]>
>>> wrote:
>>>
>>>> Currently no, but this looks easy to do.
>>>> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>>>>
>>>> Cheers,
>>>> Alexandre
>>>>
>>>>
>>>> On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:
>>>>
>>>>> Yes! is there anything like that?
>>>>>
>>>>> Cheers,
>>>>> Roberto
>>>>>
>>>>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>
>>>>>> Hi Roberto
>>>>>>
>>>>>>> Is there any way to both forward an event and also trigger it on the node itself?
>>>>>>
>>>>>> Are you referring to something like:
>>>>>> view processAndForward: ROMouseClick.
>>>>>>
>>>>>> Cheers,
>>>>>> Alexandre
>>>>>>
>>>>>>
>>>>>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>>>>>
>>>>>>>
>>>>>>> Cheers and thanks in advance,
>>>>>>> Roberto
>>>>>>>
>>>>>>>
>>>>>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>>>>>> Hi Vanessa,
>>>>>>>>>
>>>>>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>>>>>
>>>>>>>>>>> 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
>>>>>>>>>>> [hidden email]
>>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>> [hidden email]
>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Moose-dev mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> --
>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Roassal] Nested nodes and RODraggable

abergel
Can you provide a ready-to-use image on a dropbox or somewhere?


Alexandre


On Dec 12, 2012, at 9:44 AM, [hidden email] wrote:

> Hi Alexandre,
>
> On Dec 12, 2012, at 12:50 AM, Alexandre Bergel <[hidden email]> wrote:
>
>> Roberto, I had a look at what you have asked for. I have added the method ROEvent>>emitToParent
>>
>> Here an example:
>>
>> | t spr sprInner |
>> t := 0.
>> spr := ROElement new.
>> spr on: ROMouseEnter do: [ :evt | t := t + 10 ].
>>
>> sprInner := ROElement new.
>> sprInner on: ROMouseEnter do: [ :evt | t := t + 1. evt emitToParent ].
>> spr add: sprInner.
>>
>> sprInner announce: ROMouseEnter.
>> self assert: t = 11.
>>
>>
>> Roassal 1.225 supports this.
>>
>> Is this enough? I know this is not exactly the same than having processAndForward:, but I suspect it should enough in your case.
>> Can you confirm (or refute) this?
>
> Unfortunately I updated Roassal and I tried to generate my view but all the elements were out of layout (I think due to the zOrdering staff).
>
> Do you know anything about it? All my labels were out of alignment and so I immediately reverted to the old Roassal. ;)
>
> By the way I already solved the problem I had with the propagation of events ;)
>
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Dec 11, 2012, at 10:36 AM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> The class ROAnnouncer may have to be modified. I haven't closely look at it.
>>> I will work on this asap.
>>>
>>> Alexandre
>>>
>>>
>>> On Dec 11, 2012, at 10:31 AM, "[hidden email]" <[hidden email]> wrote:
>>>
>>>> Ok ;)
>>>>
>>>> By the way I tried something like
>>>>
>>>> selfDefinedInteraction add: [ :listOfNodes | listOfNodes do: [ :node | node forward: event . node announce: event . ] . ].
>>>>
>>>> But if only forwards the event..
>>>>
>>>> At the moment I solved the problem by re-adding the highlight interaction instead of forwarding it ;)
>>>>
>>>> Cheers,
>>>> Roberto
>>>>
>>>>
>>>> On Dec 11, 2012, at 10:17 AM, Alexandre Bergel <[hidden email]>
>>>> wrote:
>>>>
>>>>> Currently no, but this looks easy to do.
>>>>> Right now right now, I am on the zordering thingy. I hope to be done today. I will work on processAndForward: right afterward.
>>>>>
>>>>> Cheers,
>>>>> Alexandre
>>>>>
>>>>>
>>>>> On Dec 11, 2012, at 9:13 AM, [hidden email] wrote:
>>>>>
>>>>>> Yes! is there anything like that?
>>>>>>
>>>>>> Cheers,
>>>>>> Roberto
>>>>>>
>>>>>> On Dec 10, 2012, at 10:06 PM, Alexandre Bergel <[hidden email]> wrote:
>>>>>>
>>>>>>> Hi Roberto
>>>>>>>
>>>>>>>> Is there any way to both forward an event and also trigger it on the node itself?
>>>>>>>
>>>>>>> Are you referring to something like:
>>>>>>> view processAndForward: ROMouseClick.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Alexandre
>>>>>>>
>>>>>>>
>>>>>>> NB: Sorry for being away from the mailing list these days. I am personally overwhelmed with work these days and there are some important issues in Roassal to address (e.g., ROZOrdering). I will soon be back!
>>>>>>>
>>>>>>>>
>>>>>>>> Cheers and thanks in advance,
>>>>>>>> Roberto
>>>>>>>>
>>>>>>>>
>>>>>>>> On Dec 7, 2012, at 8:33 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] wrote:
>>>>>>>>>> Hi Vanessa,
>>>>>>>>>>
>>>>>>>>>> On Dec 7, 2012, at 4:47 PM, Vanessa Peña Araya <[hidden email]> 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, [hidden email] 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.png.
>>>>>>>>>>>>
>>>>>>>>>>>> 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
>>>>>>>>>>>> [hidden email]
>>>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>>> [hidden email]
>>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>> [hidden email]
>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Moose-dev mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>> --
>>>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel  http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev