OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000165OMNeT++runtime / Tkenvpublic2010-05-05 16:162010-05-18 17:32
andras 
rhornig 
normalfeaturehave not tried
resolvedfixed 
 
4.1rc1 
0000165: Fit network size to window size
"It would also be great to have an option to adapt the size of the canvas used for layouting to the current size of the Tk window. In this case the user could dynamically adapt the canvas size."

Feature request split from bug 0000038. See also initial patch there.
No tags attached.
patch fitToWindowSize.patch (2,030) 2010-05-06 17:13
https://dev.omnetpp.org/bugs/file_download.php?file_id=35&type=bug
Issue History
2010-05-05 16:16andrasNew Issue
2010-05-05 16:57andrasNote Added: 0000274
2010-05-06 12:23baumgartNote Added: 0000285
2010-05-06 17:13baumgartFile Added: fitToWindowSize.patch
2010-05-06 17:15baumgartNote Added: 0000286
2010-05-18 17:32rhornigNote Added: 0000304
2010-05-18 17:32rhornigStatusnew => resolved
2010-05-18 17:32rhornigFixed in Version => 4.1rc1
2010-05-18 17:32rhornigResolutionopen => fixed
2010-05-18 17:32rhornigAssigned To => rhornig

Notes
(0000274)
andras   
2010-05-05 16:57   
Some additional points to consider:
- this is a significant change in behavior, so if it gets implemented, there should be an option to turn it on/off. (Moreover, it should probably be turned off by default.)
- if the compound module rectangle's size is to be determined by the window size, then the initial window size should probably be determined from the graphics (for example, a compound module with three submodules should open in a small window, and a large network should come open in a large window). Use a pre-layout for that (takes extra time)? or base it on the number of modules for example?
- resizing the window should then result in re-layouting?
- wouldn't it be better to leave the layouting alone, and instead adjust the zoom factor to suit the window size?
(0000285)
baumgart   
2010-05-06 12:23   
I agree, that this features needs an option to turn in on (e.g. @bgb=0,0).

Personally I don't mind if points 2. and 3. get implemented - the simple behavior to only adjust the canvas size, if you manually press the re-layout button is sufficient for our use cases.

To adjust the zoom factor provides a different effect, which currently can be used in combination with the "adjusted windows size" patch. But adjusting the zoom factor alone is not enough (people could already do this with the unpatched version and asked me to implemented the new window resize behavior).
(0000286)
baumgart   
2010-05-06 17:15   
Added a patch to implement the basic fit to window size behavior. This is disabled by default - to enable set the display string bgb[5] = 1.
(0000304)
rhornig   
2010-05-18 17:32   
Two new options added into the tkenv/configuration option.
1. allow the layouter to resize the main window to the size of the canvas
2. allow the layouter to set the zoom, to fit the canvas into the window size