Ok, this is what I came up with:

put realExtent as the size of window. Put extent as the size of view (all elements aka encompassingRectangle).

This works for me. I was not experimenting with self signalUpdate, but if you set up camera like this and just open it should be ok.

Let me know is you have any news.

Cheers!
Uko

On 26 Oct 2013, at 22:07, MartinW <wm@fastmail.fm> wrote:

Uko2 wrote
i use Roassal graphs in Glamour panes, and i wonder if there is a way to
zoom and center the Roassal graph so that it fits entirely into its
Glamour
pane. Can this be done?

looks like this is a nice short version:

view camera bounds: view encompassingRectangle.

Hi, thank you,
perhaps i miss something, but this does not work for me. In a workspace do:

| builder |
builder := ROMondrianViewBuilder new.
builder nodes: Collection withAllSubclasses.
builder edgesFrom: #superclass.
builder treeLayout.
builder view explore.
builder open.

Now resize the window to very big (very small) and in the explorer on the
view do:
self camera bounds: self encompassingRectangle.
self signalUpdate.

Nothing happens at all?
M.



--
View this message in context: http://forum.world.st/Zoom-to-fit-pane-for-Roassal-tp4716227p4717456.html
Sent from the Moose mailing list archive at Nabble.com.
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev