﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5849	Automatic elimination of blank areas in diagrams (companion to #5841)	massimo ceraolo	Adeel Asghar	"This is a companion discussion to ticket #5841, and should be considered once that ticket is solved.

Very often programmers leave ample blank areas around their diagrams. I think this is not done on purpose, just they concentrate on their activity and don't care about blank areas.

To fix ideas, consider PowerGrids.Examples.Tutorial.GridOperation.Static.PowerFlow, as in Diagram1.png.

Blank areas reduce the size of the useful objects, and this reduces diagram visibility especially when they are shown in the Plotting perspective, sharing desktop space with plot windows.

To improve the situation, I think that an ""Extent to contents"" function should be provided, which would eliminate blank areas outside the actual diagram content, giving as result something like what shown in Diagram2.png (where, before clicking, I slightly displaced the System box).

Obviously, the same effect can be obtained manually changing the extent: this button would just make it much faster. 

A possible implementation of this button could be to choose the extent to be the smallest rectangle containing all the diagram elements (maybe making an exception for the outer interfaces), with values being divisible by 10. The tool would also center the diagram content to the extent. 
This ""Extent to contents"" function would not require a button of its own: it could simply be associated with the already existing ""Reset Zoom"" button, e.g. using CTRL+click on that button.

Any support for this idea?
"	discussion	closed	normal	1.18.0	OMEdit		fixed		
