GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoSubGraph Class / ComputeCollapsedSize Method
true when the size of any CollapsedObject should be considered
In This Topic
    ComputeCollapsedSize Method
    In This Topic
    Determine the size that this subgraph should be when collapsed, excluding any collapsed margin.
    Syntax
    public virtual SizeF ComputeCollapsedSize( 
       bool visible
    )

    Parameters

    visible
    true when the size of any CollapsedObject should be considered

    Return Value

    the size of CollapsedObject, if it is not null/nothing and visible is true, and the union of the sizes of all the children, including the collapsed sizes of subgraphs
    Remarks

    Unlike ComputeBounds, this method is used to calculate the expected size of this node when collapsed, so that Collapse can call CollapseChild and FinishCollapse with the intended collapsed bounds. The size of each child (that is not skipped by ComputeCollapsedSizeSkip) is given by the GoObject.SelectionObject, except for nested subgraphs, where ComputeCollapsedSize is called recursively. This method does not augment the size to include the CollapsedTopLeftMargin or CollapsedBottomRightMargin.

    Note that the standard behavior of this method makes sure the resulting size is wide enough to hold each child node and tall enough to hold each child node--it is not just the size of any CollapsedObject. The reason is that the standard behavior wants to insure that all links connected to child nodes will end at or in the collapsed subgraph, not potentially far away from the subgraph.

    See Also