Hi,
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? Best regards, Martin. |
Hi Martin,
A roassal view has a camera attached to it. Moving the camera may actually what you need. Consider this example: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | builder | builder := ROMondrianViewBuilder new. builder nodes: Collection withAllSubclasses. builder edgesFrom: #superclass. builder treeLayout. builder open. builder raw camera bounds: (0 @ 0 extent: 700 @ 700). -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= To play with it, you can open an inspector on the view (i.e., builder raw inspect) as illustrated in the screenshot: Let us know if this fits your need or not. Cheers, Alexandre On Oct 21, 2013, at 5:34 PM, MartinW <[hidden email]> wrote: Hi, -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Alex,
Thanks for the script. On Mon, Oct 21, 2013 at 11:33 PM, Alexandre Bergel <[hidden email]> wrote:
What would be nice is to know the bounds of the visualization and set those as camera bounds so that the complete visualization is displayed. Is there a way to see the bounds of the displayed visu? I tried to play a bit with ROCamera>>moveToSee: but it simply moves the camera in x-y coordinates.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
Hi Alexandre, thank you for the script. I started playing around with the camera - but despite the fact i read the deep into pharo chapter, I do not really understand the camera metaphor. What exactly do *extent*, *realExtent* and *altitude* stand for - and how would i manipulate them to fit the entire visualization in the window/glamour pane? Can you explain a bit - or is it explained somewhere to a greater extent than in the deep into pharo chapter? Martin. |
In reply to this post by MartinW
On 21 Oct 2013, at 17:34, MartinW <[hidden email]> wrote: > Hi, > > 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? Hi, looks like this is a nice short version: view camera bounds: view encompassingRectangle. By the way, I’d like to duplicate this as a question on stack overflow, so if no one has anything against I’ll just put Q/A. Cheers. Uko > > Best regards, > Martin. > > > > -- > View this message in context: http://forum.world.st/Zoom-to-fit-pane-for-Roassal-tp4716227.html > Sent from the Moose mailing list archive at Nabble.com. > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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. |
In reply to this post by MartinW
Hi!
I am currently away from my computer, answering emails by finding wifi accesses in cafe nearby. I will answer next week, once I got back to work Cheers, Alexandre > Le 22-10-2013 à 15:15, MartinW <[hidden email]> a écrit : > > abergel wrote >> A roassal view has a camera attached to it. Moving the camera may actually >> what you need. Consider this example: >> >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> | builder | >> builder := ROMondrianViewBuilder new. >> builder nodes: Collection withAllSubclasses. >> builder edgesFrom: #superclass. >> builder treeLayout. >> builder open. >> >> builder raw camera bounds: (0 @ 0 extent: 700 @ 700). >> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >> >> To play with it, you can open an inspector on the view (i.e., builder raw >> inspect) as illustrated in the screenshot: >> >> Let us know if this fits your need or not. > > Hi Alexandre, > thank you for the script. > > I started playing around with the camera - but despite the fact i read the > deep into pharo chapter, I do not really understand the camera metaphor. > What exactly do *extent*, *realExtent* and *altitude* stand for - and how > would i manipulate them to fit the entire visualization in the > window/glamour pane? > Can you explain a bit - or is it explained somewhere to a greater extent > than in the deep into pharo chapter? > > Martin. > > > > -- > View this message in context: http://forum.world.st/Zoom-to-fit-pane-for-Roassal-tp4716227p4716437.html > Sent from the Moose mailing list archive at Nabble.com. > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by MartinW
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 <[hidden email]> wrote: Uko2 wrotei use Roassal graphs in Glamour panes, and i wonder if there is a way to _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by MartinW
Hi Martin,
Sorry for my late reply. > I started playing around with the camera - but despite the fact i read the > deep into pharo chapter, I do not really understand the camera metaphor. There are two things here: the model behind the camera in Roassal, and the implementation. The implementation has not really been tested. So it may be that the API is not intuitive. > What exactly do *extent*, *realExtent* and *altitude* stand for - and how > would i manipulate them to fit the entire visualization in the > window/glamour pane? > Can you explain a bit - or is it explained somewhere to a greater extent > than in the deep into pharo chapter? I played a bit with this, and apparently it does not operate in a way that one would expect. We will work on it. Probably this part of Roassal will go under severe refactoring as soon as Athens is part of Pharo. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by MartinW
Hi Martin,
Sorry for my late reply. > I started playing around with the camera - but despite the fact i read the > deep into pharo chapter, I do not really understand the camera metaphor. There are two things here: the model behind the camera in Roassal, and the implementation. The implementation has not really been tested. So it may be that the API is not intuitive. > What exactly do *extent*, *realExtent* and *altitude* stand for - and how > would i manipulate them to fit the entire visualization in the > window/glamour pane? > Can you explain a bit - or is it explained somewhere to a greater extent > than in the deep into pharo chapter? I played a bit with this, and apparently it does not operate in a way that one would expect. We will work on it. Probably this part of Roassal will go under severe refactoring as soon as Athens is part of Pharo. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |