Updates: Status: Started
Comment #2 on issue 870 by alexandr...@gmail.com: 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.
Comment #3 on issue 870 by tu...@tudorgirba.com: 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
Comment #4 on issue 870 by alexandr...@gmail.com: 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.
Comment #5 on issue 870 by tu...@tudorgirba.com: 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 ].
Comment #6 on issue 870 by benjamin...@gmail.com: 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.
Comment #7 on issue 870 by alexandr...@gmail.com: 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?