Hi, is there in roassal any event that triggers right after the layout is applied?
What I'm trying to do is to center on an element after the layout is applied (so after the element have a position in the visualization).
Thanks, Fabrizio
is there in roassal any event that triggers right after the layout is applied?
Currently no. It would be easy to add this.
What I'm trying to do is to center on an element after the layout is applied (so after the element have a position in the visualization).
I can't really figure out why you need this. I would understand if the layout would be done in a background thread, but this is not the case. Here an example on how to focus after a layout:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view nodes dictionaryNode | view := ROMondrianViewBuilder new. "enter your script below" "-------------" "-------------"
nodes := view nodes: Collection withAllSubclasses. dictionaryNode := nodes detect: [ :element | element model == Dictionary ]. view open.
ROFocusView on: dictionaryNode. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Note that the use of ROFocusView cannot be done before opening the view. The reason is that opening the view triggers the layout. Do you want to open the view after doing the focus ? This is doable, just let me know.
Cheers, Alexandre
Hi,
When you are in the context of Glamour, you do not have access to open.
That is why it would be good to have this even available.
Cheers, Doru
On 15 Nov 2012, at 16:32, Alexandre Bergel alexandre.bergel@me.com wrote:
is there in roassal any event that triggers right after the layout is applied?
Currently no. It would be easy to add this.
What I'm trying to do is to center on an element after the layout is applied (so after the element have a position in the visualization).
I can't really figure out why you need this. I would understand if the layout would be done in a background thread, but this is not the case. Here an example on how to focus after a layout:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view nodes dictionaryNode | view := ROMondrianViewBuilder new. "enter your script below" "-------------" "-------------"
nodes := view nodes: Collection withAllSubclasses. dictionaryNode := nodes detect: [ :element | element model == Dictionary ]. view open.
ROFocusView on: dictionaryNode.
Note that the use of ROFocusView cannot be done before opening the view. The reason is that opening the view triggers the layout. Do you want to open the view after doing the focus ? This is doable, just let me know.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"In a world where everything is moving ever faster, one might have better chances to win by moving slower."
Good point!
I've added ROLayoutBeing and ROLayoutEnd, both subclass of ROLayoutEvent.
Using the Mondrian DSL:
-=-=-=-=-=-=-=-= view nodes: (1 to: 20). view horizontalLineLayout on: ROLayoutEnd do: [:event | ... ]. -=-=-=-=-=-=-=-=
Or the Roassal API: -=-=-=-=-=-=-=-= ROHorizontalLineLayout on: ROLayoutEvent do: [ :event | events add: event ]; applyOn: yourElements -=-=-=-=-=-=-=-=
Thanks for the suggestion. What we should do also, is to have a ROLayoutStep to have a progress bar while doing layout.
Cheers, Alexandre
On Nov 15, 2012, at 12:44 PM, Tudor Girba tudor@tudorgirba.com wrote:
Hi,
When you are in the context of Glamour, you do not have access to open.
That is why it would be good to have this even available.
Cheers, Doru
On 15 Nov 2012, at 16:32, Alexandre Bergel alexandre.bergel@me.com wrote:
is there in roassal any event that triggers right after the layout is applied?
Currently no. It would be easy to add this.
What I'm trying to do is to center on an element after the layout is applied (so after the element have a position in the visualization).
I can't really figure out why you need this. I would understand if the layout would be done in a background thread, but this is not the case. Here an example on how to focus after a layout:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view nodes dictionaryNode | view := ROMondrianViewBuilder new. "enter your script below" "-------------" "-------------"
nodes := view nodes: Collection withAllSubclasses. dictionaryNode := nodes detect: [ :element | element model == Dictionary ]. view open.
ROFocusView on: dictionaryNode.
Note that the use of ROFocusView cannot be done before opening the view. The reason is that opening the view triggers the layout. Do you want to open the view after doing the focus ? This is doable, just let me know.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"In a world where everything is moving ever faster, one might have better chances to win by moving slower."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
On 15 Nov 2012, at 18:13, Alexandre Bergel alexandre.bergel@me.com wrote:
Good point!
I've added ROLayoutBeing and ROLayoutEnd, both subclass of ROLayoutEvent.
Using the Mondrian DSL:
-=-=-=-=-=-=-=-= view nodes: (1 to: 20). view horizontalLineLayout on: ROLayoutEnd do: [:event | ... ]. -=-=-=-=-=-=-=-=
Or the Roassal API:
ROHorizontalLineLayout on: ROLayoutEvent do: [ :event | events add: event ]; applyOn: yourElements -=-=-=-=-=-=-=-=
Excellent!
Thanks for the suggestion. What we should do also, is to have a ROLayoutStep to have a progress bar while doing layout.
Good point. It would be quite cool.
Cheers, Doru
Cheers, Alexandre
On Nov 15, 2012, at 12:44 PM, Tudor Girba tudor@tudorgirba.com wrote:
Hi,
When you are in the context of Glamour, you do not have access to open.
That is why it would be good to have this even available.
Cheers, Doru
On 15 Nov 2012, at 16:32, Alexandre Bergel alexandre.bergel@me.com wrote:
is there in roassal any event that triggers right after the layout is applied?
Currently no. It would be easy to add this.
What I'm trying to do is to center on an element after the layout is applied (so after the element have a position in the visualization).
I can't really figure out why you need this. I would understand if the layout would be done in a background thread, but this is not the case. Here an example on how to focus after a layout:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view nodes dictionaryNode | view := ROMondrianViewBuilder new. "enter your script below" "-------------" "-------------"
nodes := view nodes: Collection withAllSubclasses. dictionaryNode := nodes detect: [ :element | element model == Dictionary ]. view open.
ROFocusView on: dictionaryNode.
Note that the use of ROFocusView cannot be done before opening the view. The reason is that opening the view triggers the layout. Do you want to open the view after doing the focus ? This is doable, just let me know.
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"In a world where everything is moving ever faster, one might have better chances to win by moving slower."
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
-- www.tudorgirba.com
"Innovation comes in the least expected form. That is, if it is expected, it already happened."