Tx Alex.

Two questions:

- do we have a layout with a legend because I would like to put a title on the popup (top left/center). As it is the popup in Roassal2 is an RTGroup (collection), I cannot do much with it from the visualization point of view.  I am thinking it might be worthwhile to create an abstraction for the canvas of the popup view because it is used quite often and it was present in Roassal1.

- when the visualization is huge, the camera is pointed to the bottom right of the canvas. Is there a way to focus the camera @ the top of the visualization.

usman

On Fri, Mar 21, 2014 at 1:46 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!

-=-=-=-=-=-=-=-=-=-=
| view |

view := RTMondrianViewBuilder new.
view interaction noInteractions.

view interaction popup group: [ :group :el |
| background elements | 
elements := OrderedCollection new.
background := (RTBox new color: (Color green alpha: 0.5)) element.
el model timesRepeat: [ 
elements add: (RTBox new size: 10; color: (Color purple alpha: 0.5)) element.
].
RTGridLayout on: elements.
RTNest new centerOn: background elements: elements.
group add: background .
group addAll: elements ].


view shape rectangle size: #yourself.
view nodes: (1 to:50).
view gridLayout.
view open
-=-=-=-=-=-=-=-=-=-=

For the curious, I have attached a screenshot


Alexandre



On Mar 21, 2014, at 8:48 AM, Usman Bhatti <usman.bhatti@gmail.com> wrote:

Yes it helps.

I did with the view builder and it worked!

view := RTMondrianViewBuilder new.
view interaction noInteractions.
view interaction popup group: [ :group :el |
el model timesRepeat: [ 
group add: (RTBox new size: 10; color: (Color purple alpha: 0.5)) element.
].
RTGridLayout on:group ].
view shape rectangle size: #yourself.
view nodes: (1 to:50).
view gridLayout.
view open

Is there a way to add a background color to the popup because I tried to hack into the code but could not succeed.

Usman



On Wed, Mar 19, 2014 at 8:24 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi Usman,

Yes, you can. In Roassal2, there is no more PopupView. We have introduced the notion of group, and you can set  group in the popup. Consider the following example:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v els |
v := RTView new.
v @ RTDraggableView.
els := (RTBox new size: 20) elementsOn: (1 to: 100).
els + RTLabel.

els @ (RTPopup new group: [ :group :el |
el model timesRepeat: [
group add: (RTBox new size: 10; color: (Color purple alpha: 0.5)) element ].
RTGridLayout on: group. ]).

els @ RTDraggable.

v addAll: els.
RTGridLayout on: els.
v open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Here is the result with having the mouse above “6”.
<Screen Shot 2014-03-19 at 4.20.32 PM.png>



The key is the following:
RTPopup new group: [ :group :el | … ]

group is an empty group. You need to add what you want to be displayed in the popup. el is the element on which the mouse is above.

Does this help?

Cheers,
Alexandre

On Mar 19, 2014, at 11:30 AM, Usman Bhatti <usman.bhatti@gmail.com> wrote:

Hello,

Is it possible to do popup views in Roassal 2 as we could do with ROPopupView?
I didn't find any example related to this in Roassal 2.


tx,

Usman

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev