Could you try changing the Visualisation window size
and then running the script.
I've extended the camera to have the window size.
This will enable a range of new facilities (e.g., sticking an element to a window edge)
btw, I notice that ROCamera is created in both
ROAbstractCamvas>>initialize and ROView>>initialize.
How do these relate?
The idea of having a camera in ROAbstractCanvas>>initialize is to not have to
clutter each method with "camera ifFalse: [ ^ self]" for example.
A canvas needs a camera to render things. Is the comment in this #initialize method not
enough? What could be a better comment?
P.S. just to remove doubt, I don't need this to be
pinned dynamically the bottom left, just to set the default position of the layout. )
A student is working on centering layouts... It should come soon.
P.P.S note that I will be wanting to use this from
Glamour, and in particular in my project in the image you have previously downloaded in
the mothod EpCimtest>>showClassRelationshipsSelected: just following the
ROHorizontalTreeLayout (which you can leave for me to check)
Ok
Alexandre
Alexandre Bergel wrote:
Something like:
#(1 2 3 4 5 6 7 8 9) do:
[
:x |
rawView add: (ROElement spriteOn: x) + ROLabel.
].
rawView add: (ROEdge lineFrom: rawView elements seventh to: rawView elements eighth).
rawView add: (ROEdge lineFrom: rawView elements seventh to: rawView elements ninth).
(ROHorizontalTreeLayout new verticalGap: 40; horizontalGap:60) on: rawView elements.
rawView elements do: [ :el | el @ (ROMenuActivable new item: 'act' action:
#inspect) ].
rawView translateTo: 0 @ ((rawView elements collect: [:el | el position y + el height] )
max negated + rawView camera bounds height ).
Cheers,
Alexandre
On Nov 11, 2012, at 10:31 PM, Ben Coman
<btc(a)openInWorld.com>
wrote:
With Roassal after applying a layout, I would
like to be able to translate the graph such that the bottom left corner of the graph is
displayed. Is there someway to do that already?
I looked into ROFocusView, ROCanvas & ROCamera, but could not work it out what was
needed.
With the script below, the attached image is what I would like to see.
"-------------"
#(1 2 3 4 5 6 7 8 9) do:
[
:x |
rawView add: (ROElement spriteOn: x) + ROLabel.
].
rawView add: (ROEdge lineFrom: rawView elements seventh to: rawView elements eighth).
rawView add: (ROEdge lineFrom: rawView elements seventh to: rawView elements ninth).
(ROHorizontalTreeLayout new verticalGap: 40; horizontalGap:60) on: rawView elements.
"HERE TRANSLATE CANVAS/CAMERA TO SHOW NODES 7, 8 & 9 IN THE BOTTOM LEFT CORNER
OF WINDOW PANE"
"-------------"
cheers -ben
<Roassal-how-to-show-bottom-left-corner.png>_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.