Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

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

Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology
Status: New
Owner: ----
CC: [hidden email]
Labels: Type-Defect Priority-Medium Component-Roassal Component-Glamour

New issue 870 by [hidden email]: ROFocusView focuses on the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

Open a Roassal Easel and paste this:

| node |
node := view node: #a.
ROFocusView new on: node view: view raw.

The node is selected somewhere at the bottom. The reason is likely to be  
that the canvas has a static size, instead of adapting by default to the  
size of the surrounding pane

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology
Issue 870: ROFocusView focuses on the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

This issue is now blocking issue moose-technology:816.
See http://code.google.com/p/moose-technology/issues/detail?id=816

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology
In reply to this post by moose-technology
Updates:
        Status: Started

Comment #2 on issue 870 by [hidden email]: ROFocusView focuses on  
the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

This is not an easy problem to solve apparently.

Try the following:
-=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=
| node |
node := view node: #a.
view raw
        on: ROWindowResized
        do:   [ :evt | ROFocusView new on: node view: view raw ].
-=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=

This seems to do the thing, but if you resize the window, the view always  
focuses on the node.

If you do not want to focus on the node when you resize, we could do:
-=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=
| node |
node := view node: #a.
view raw
        on: ROWindowResized
        doOnce:   [ :evt | ROFocusView new on: node view: view raw ].
-=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=   -=-=-=-=-=

But this does not work since the romorph is resized 4 times when you open  
the roassal glamour-based easel.



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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology

Comment #3 on issue 870 by [hidden email]: ROFocusView focuses on the  
wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

The problem is not that the view does not keep being focused. The problem  
is that the focused element is placed at a strange location: the node  
appears somewhere at the bottom left.

I would expect a different behavior. Perhaps something like:
- if the element is already visible, nothing should be done
- if the element is not visible, the camera should move with the minimal  
amount until the node gets in the camera

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology

Comment #4 on issue 870 by [hidden email]: ROFocusView focuses on  
the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

I am not sure to understand. In the moose one-click, if I open a  
glamour-based roassal easel, and type:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| node |
node := view node: #a.
view raw
        on: ROWindowResized
        do:   [ :evt | ROFocusView new on: node view: view raw ].
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The node is at the center of the roassal widget. Is this not the case for  
you?

What do you mean by "The problem is not that the view does not keep being  
focused."?  The node remains at the center of the roassal pane if I resize  
the easel.

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology

Comment #5 on issue 870 by [hidden email]: ROFocusView focuses on the  
wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

Indeed, this was the case. Now it works.

However, we still need to enhance the logic a bit, or add a different  
action that has a different semantics.

For example, in a tree layout, you never want it in the middle:
| node |
node := view node: 'a'.
view node: 'b'.
view edge: 42 from: ['a'] to: ['b'].
view treeLayout.
view raw
        on: ROWindowResized
        do:   [ :evt | ROFocusView new on: node view: view raw ].

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology

Comment #6 on issue 870 by [hidden email]: ROFocusView focuses on  
the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

> But this does not work since the romorph is resized 4 times when you open  
> the roassal glamour-based easel.

That currently has no visible effect, and so suits me fine for the moment.

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology

Comment #7 on issue 870 by [hidden email]: ROFocusView focuses on  
the wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

Doru, I do not understand "in a tree layout, you never want it in the  
middle".
What we do not want it in the middle? The tree? Why not?
A semantic could be: if the visualization is smaller than the window, then  
do nothing when focusing?

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

Re: Issue 870 in moose-technology: ROFocusView focuses on the wrong spot

moose-technology
In reply to this post by moose-technology
Updates:
        Status: Fixed
        Labels: Milestone-4.8

Comment #8 on issue 870 by [hidden email]: ROFocusView focuses on the  
wrong spot
http://code.google.com/p/moose-technology/issues/detail?id=870

Ok. Now it seems to work well:


| node |
node := view node: -1.
view nodes: (1 to: 1000).
view edgesFrom: [ :x | x // 10 ].
view treeLayout.
ROFocusView new on: node view: view raw.


--
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev