markgojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
1,459 lines (476 loc) • 101 kB
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GoJS® Group Class</title>
<script src="../../assets/js/jquery.min.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script src="../../assets/js/highlight.js"></script>
<script src="../../assets/js/api.js"></script>
<script src="../../assets/js/fuse.min.js"></script>
<link href="../../assets/css/bootstrap.min.css" rel="stylesheet" >
<!-- custom CSS after bootstrap -->
<link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/>
<!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />-->
<link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" />
</head>
<body>
<!-- non-fixed navbar -->
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
<div class="container-fluid">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../index.html">Home</a></li>
<li><a href="../../learn/index.html">Learn</a></li>
<li><a href="../../samples/index.html">Samples</a></li>
<li><a href="../../intro/index.html">Intro</a></li>
<li><a href="../../api/index.html">API</a></li>
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
<li><a href="../../download.html">Download</a></li>
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<!-- ============================== classes index ============================ -->
<div id="navindex" class="col-md-2">
<!-- begin publish.classesIndex -->
<!-- <div><a href="../index.html">GoJS Class Index</a></div> -->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Diagram Classes</span>
</div>
</div>
<div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li>
<li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li>
<li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li>
<li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li>
<li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li>
<li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li>
<li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li>
<li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li>
<li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li>
<li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li>
<li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li>
<li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li>
<li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li>
<li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li>
<li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li>
<li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li>
<li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li>
<li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li>
<li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li>
<li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Geometry Classes</span>
</div>
</div>
<div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li>
<li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li>
<li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li>
<li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li>
<li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li>
<li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li>
<li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li>
<li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li>
<li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Model Classes</span>
</div>
</div>
<div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li>
<li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li>
<li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li>
<li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li>
<li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li>
<li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li>
<li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Layout Classes</span>
</div>
</div>
<div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li>
<li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li>
<li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li>
<li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li>
<li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li>
<li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li>
<li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Tool Classes</span>
</div>
</div>
<div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li>
<li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li>
<li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li>
<li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li>
<li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li>
<li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li>
<li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li>
<li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li>
<li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li>
<li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li>
<li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li>
<li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li>
<li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li>
<li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li>
<li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li>
<li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li>
<li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Collection Classes</span>
</div>
</div>
<div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li>
<li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li>
<li><a href="../symbols/List.html" class="linkConstructor">List</a></li>
<li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li>
<li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li>
</ul>
</div>
</div>
</div> <!-- /class="sidebar-nav -->
<!-- end publish.classesIndex -->
</div>
<div id="contentBody" class="col-md-10">
<div class="searchsumm">
<div class="table-wrap">
<div class="table-cell" id="apisearch" data-base="../">
<div class="title">Search API</div>
<div class="field">
<label for="search-field" class="search-icon"></label>
<input id="search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
</div>
<div class="table-cell" id="apisumm">
<input type="checkbox" id="showsumms" />
<label class="apisumms" for="showsumms">Show Summaries</label>
</div>
</div>
</div>
<!-- ============================== header ================================= -->
<div id="header" class="fineprint">
<b>GoJS</b>® Diagramming Components<br/>version 1.8.36 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>
</div>
<!-- ============================== class title ============================ -->
<h2 class="classTitle">
Class Group
</h2>
<!-- ============================== class summary ========================== -->
<p class="classsummary">
<span class="extends"> Extends
<a href="../symbols/Node.html" class="linkConstructor">Node</a>.</span>
A Group is a <a href="../symbols/Node.html" class="linkConstructor">Node</a> that can contain a subgraph of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s,
which are members of the group.
<p class="box">
For more discussion, see <a href="../../intro/groups.html">Introduction to Groups</a>.
See samples that make use of Groups in the <a href="../../samples/index.html#groups">samples index</a>.
<p>
Although you can create a Group and <a href="../symbols/Diagram.html#add" class="linkMethod">Diagram.add</a> it to a Diagram, this does not update the Model.
It is more common to create a group by adding a node data object to the model
by calling <a href="../symbols/Model.html#addNodeData" class="linkMethod">Model.addNodeData</a>. For example:
<pre>
myDiagram.startTransaction("make new group");
myDiagram.model.addNodeData({ key: "Omega", isGroup: true });
myDiagram.commitTransaction("make new group");
</pre>
<p>
This will cause a Group to be created (copying the template found in <a href="../symbols/Diagram.html#groupTemplateMap" class="linkProperty">Diagram.groupTemplateMap</a>),
added to the Diagram in some <a href="../symbols/Layer.html" class="linkConstructor">Layer</a> (based on <a href="../symbols/Part.html#layerName" class="linkProperty">Part.layerName</a>), and bound to the group data
(resulting in <a href="../symbols/Panel.html#data" class="linkProperty">Panel.data</a> referring to that group data object).
Note that the JavaScript object includes setting <code>isGroup</code> to true,
to indicate that the object represents a Group rather than a regular Node or simple Part.
<p>
The member Parts of a Group, which you can access as the <a href="../symbols/Group.html#memberParts" class="linkProperty">memberParts</a> collection,
belong to the group but are not in the visual tree of the group.
All <a href="../symbols/Part.html" class="linkConstructor">Part</a>s are directly in <a href="../symbols/Layer.html" class="linkConstructor">Layer</a>s -- they cannot be inside a <a href="../symbols/Panel.html" class="linkConstructor">Panel</a>.
This allows group member parts to be in layers different from the group's layer.
<p>
You can change the membership of a <a href="../symbols/Node.html" class="linkConstructor">Node</a> or a simple <a href="../symbols/Part.html" class="linkConstructor">Part</a> in a Group by setting
its <a href="../symbols/Part.html#containingGroup" class="linkProperty">Part.containingGroup</a> property.
This is done automatically for you by the diagram if you initialize the <code>group</code> property on the node data
in the model to be the key of the containing group node data.
Thus you should do something like:
<pre class="javascript">
myDiagram.startTransaction("add new member");
myDiagram.model.addNodeData({ group: someexistinggroup.data.key, ... });
myDiagram.commitTransaction("add new member");
</pre>
<p>
where you would make sure the node data object included all of the properties you need.
You can also change the relationship dynamically by calling <a href="../symbols/GraphLinksModel.html#setGroupKeyForNodeData" class="linkMethod">GraphLinksModel.setGroupKeyForNodeData</a>.
<p>
The membership of <a href="../symbols/Link.html" class="linkConstructor">Link</a>s is computed automatically for you by the diagram based on the membership of
the connected <a href="../symbols/Node.html" class="linkConstructor">Node</a>s.
For example, if the <a href="../symbols/Link.html#fromNode" class="linkProperty">Link.fromNode</a> is a top-level node but the <a href="../symbols/Link.html#toNode" class="linkProperty">Link.toNode</a> is a member of a group,
the link is a top-level link.
If the two connected nodes both belong to the same group, the link is a member of that group.
If the two connected nodes belong to different groups, the link belongs to the common container group, if there is any.
Note that if a link connects a member of a group with the group itself, the link is a member of that group.
<p>
All of the group-member relationships effectively form a tree structure.
These properties and methods are useful in navigating these relationships:
<ul>
<li><a href="../symbols/Part.html#containingGroup" class="linkProperty">Part.containingGroup</a></li>
<li><a href="../symbols/Part.html#isTopLevel" class="linkProperty">Part.isTopLevel</a></li>
<li><a href="../symbols/Part.html#findTopLevelPart" class="linkMethod">Part.findTopLevelPart</a></li>
<li><a href="../symbols/Part.html#findSubGraphLevel" class="linkMethod">Part.findSubGraphLevel</a></li>
<li><a href="../symbols/Part.html#findCommonContainingGroup" class="linkMethod">Part.findCommonContainingGroup</a></li>
<li><a href="../symbols/Group.html#memberParts" class="linkProperty">memberParts</a></li>
<li><a href="../symbols/Group.html#findSubGraphParts" class="linkMethod">findSubGraphParts</a></li>
<li><a href="../symbols/Group.html#findExternalLinksConnected" class="linkMethod">findExternalLinksConnected</a></li>
<li><a href="../symbols/Group.html#findExternalNodesConnected" class="linkMethod">findExternalNodesConnected</a></li>
</ul>
<p>
As the membership of a group changes, you may want to update the appearance of the group.
You can set the <a href="../symbols/Group.html#memberAdded" class="linkProperty">memberAdded</a> and <a href="../symbols/Group.html#memberRemoved" class="linkProperty">memberRemoved</a> properties to be functions that are called.
These functions must not modify any membership relationships -- these function properties just exist to update the appearance of the Group.
<p>
You can control whether certain Nodes are added to a Group by <a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">CommandHandler.groupSelection</a> or
<a href="../symbols/Group.html#addMembers" class="linkMethod">addMembers</a> or <a href="../symbols/CommandHandler.html#addTopLevelParts" class="linkMethod">CommandHandler.addTopLevelParts</a> by affecting the result of <a href="../symbols/CommandHandler.html#isValidMember" class="linkMethod">CommandHandler.isValidMember</a>,
which is responsible for deciding whether it is OK to add a Node to a Group or to remove a Node from a Group to be a top-level node.
You can override that predicate on CommandHandler, but it is easier to set the <a href="../symbols/Group.html#memberValidation" class="linkProperty">memberValidation</a> or
<a href="../symbols/CommandHandler.html#memberValidation" class="linkProperty">CommandHandler.memberValidation</a> functional property.
<p class="box">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
<p>
The area occupied by the subgraph is represented in the group's visual tree by a <a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a>.
As the group <a href="../symbols/Group.html#placeholder" class="linkProperty">placeholder</a> grows and shrinks based on the sizes and positions of the member nodes and links,
the group will grow and shrink accordingly.
The placeholder is always the <a href="../symbols/Part.html#locationObject" class="linkProperty">Part.locationObject</a>,
although you may specify any <a href="../symbols/Spot.html" class="linkConstructor">Spot</a> as the <a href="../symbols/Part.html#locationSpot" class="linkProperty">Part.locationSpot</a>.
A Group need not have a placeholder, but it may have at most one.
<p>
A group has its own <a href="../symbols/Group.html#layout" class="linkProperty">layout</a> property that is used to position the member nodes and route the member links.
<p>
The Group class also supports the notion of expanding and collapsing the subgraph,
causing the member nodes and links to be shown or hidden.
Principally this is a matter of setting <a href="../symbols/Group.html#isSubGraphExpanded" class="linkProperty">isSubGraphExpanded</a>.
Changes to this property will result in calls to <a href="../symbols/Group.html#collapseSubGraph" class="linkMethod">collapseSubGraph</a> or <a href="../symbols/Group.html#expandSubGraph" class="linkMethod">expandSubGraph</a>, as appropriate.
<p>
If you want to change the appearance of the group you can do so in a function that you assign to
the <a href="../symbols/Group.html#subGraphExpandedChanged" class="linkProperty">subGraphExpandedChanged</a> property.
This function must not modify any member relationships or expand or collapse any groups -- the functional property just exists
to update the appearance of the Group.
<p class="box">
For more discussion and examples, see <a href="../../intro/subgraphs.html">SubGraphs</a>.
<p>
If you want the user to be able to create a Group out of the currently
selected Parts using the <a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">CommandHandler.groupSelection</a> command,
you need to first set the <a href="../symbols/CommandHandler.html#archetypeGroupData" class="linkProperty">CommandHandler.archetypeGroupData</a> property
to a data object with <code>isGroup</code> set to true.
If you want the user to be able to ungroup a Group,
using the <a href="../symbols/CommandHandler.html#ungroupSelection" class="linkMethod">CommandHandler.ungroupSelection</a> command,
you need to set <a href="../symbols/Group.html#ungroupable" class="linkProperty">ungroupable</a> to true.
<p class="box">
For more discussion and examples, see <a href="../../intro/groups.html">Groups</a>,
<a href="../../intro/subgraphs.html">SubGraphs</a>, and
<a href="../../intro/sizedGroups.html">Sized Groups</a>.
<p>
Only Groups that are in Diagrams can have member Parts or connections via Links.
Templates should not be connected with Links, be labels of Links, be members of Groups, have any member Parts, or have any Adornments.
</p>
<!-- ============================== constructor summary ==================== -->
<h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class Group.">
<thead>
<tr>
<th scope="col" class="name">Name</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" >
<div class="name">
Group(type)
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Constructs an empty Group with no visual elements and no member parts;
normally a Group will have some visual elements surrounding a <a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a>.<span class="nodetails" id="xconGroup"><a class="morelink" onclick="hst('conGroup')">More...</a></span> <span class="details" id="conGroup"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{EnumValue=}</span> <b>type</b>
</dt>
<dd>if not supplied, the default Panel type is <a href="../symbols/Panel.html#Position" class="linkConstant">Panel.Position</a>.</dd>
</dl>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== properties summary ===================== -->
<h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class Group.">
<thead>
<tr>
<th scope="col" class="name">Name, Value Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="computesBoundsAfterDrag" >
<td class="name">
<div class="name">
computesBoundsAfterDrag
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether the size of the area of the <a href="../symbols/Group.html" class="linkConstructor">Group</a>'s <a href="../symbols/Group.html#placeholder" class="linkProperty">placeholder</a>
should remain the same during a <a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a> move until a drop occurs.<span class="nodetails" id="xpropcomputesBoundsAfterDrag"><a class="morelink" onclick="hst('propcomputesBoundsAfterDrag')">More...</a></span> <span class="details" id="propcomputesBoundsAfterDrag">
Groups within temporary layers (such as new Groups during a drag-copy) are unaffected by this property.
</span><div class="details" id="dpropcomputesBoundsAfterDrag"><p>
In other words, when the value is true, re-computing the bounds of the
members is suspended until a drop occurs, at which time the border is recomputed,
perhaps not including some members that had been dragged out and reparented.
The initial value is false.</div>
</div>
</td>
</tr>
<tr id="computesBoundsIncludingLinks" >
<td class="name">
<div class="name">
computesBoundsIncludingLinks
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether a <a href="../symbols/Group.html#placeholder" class="linkProperty">placeholder</a>'s bounds includes the bounds of member Links.<span class="nodetails" id="xpropcomputesBoundsIncludingLinks"><a class="morelink" onclick="hst('propcomputesBoundsIncludingLinks')">More...</a></span> <span class="details" id="propcomputesBoundsIncludingLinks">
The default value is true.
If this is false, only non-Link member Parts are used to compute the Placeholder's bounds in document coordinates.</span>
</div>
</td>
</tr>
<tr id="computesBoundsIncludingLocation" >
<td class="name">
<div class="name">
computesBoundsIncludingLocation
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether a <a href="../symbols/Group.html#placeholder" class="linkProperty">placeholder</a>'s bounds includes the previous Group.location.<span class="nodetails" id="xpropcomputesBoundsIncludingLocation"><a class="morelink" onclick="hst('propcomputesBoundsIncludingLocation')">More...</a></span> <span class="details" id="propcomputesBoundsIncludingLocation">
The default value is false.</span>
</div>
</td>
</tr>
<tr id="handlesDragDropForMembers" >
<td class="name">
<div class="name">
handlesDragDropForMembers
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.5</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether drag-and-drop events may be bubbled up to this Group if not handled by member Parts.<span class="nodetails" id="xprophandlesDragDropForMembers"><a class="morelink" onclick="hst('prophandlesDragDropForMembers')">More...</a></span> <span class="details" id="prophandlesDragDropForMembers">
The default value is false -- each Node or Link that is a member of the Group needs to define
its own <a href="../symbols/GraphObject.html#mouseDragEnter" class="linkProperty">GraphObject.mouseDragEnter</a>, <a href="../symbols/GraphObject.html#mouseDragLeave" class="linkProperty">GraphObject.mouseDragLeave</a>, and <a href="../symbols/GraphObject.html#mouseDrop" class="linkProperty">GraphObject.mouseDrop</a>
event handlers if you want dragging/dropping on a member part to act as if the user were acting on the group.
</span><div class="details" id="dprophandlesDragDropForMembers"><p>
This is currently restricted to only call the mouseDragEnter, mouseDragLeave, and mouseDrop event handlers
defined on the whole Group, not on any element inside the Group's visual tree.</div>
</div>
</td>
</tr>
<tr id="isSubGraphExpanded" >
<td class="name">
<div class="name">
isSubGraphExpanded
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether the subgraph contained by this group is expanded.<span class="nodetails" id="xpropisSubGraphExpanded"><a class="morelink" onclick="hst('propisSubGraphExpanded')">More...</a></span> <span class="details" id="propisSubGraphExpanded">
Changing this property's value will call <a href="../symbols/Group.html#collapseSubGraph" class="linkMethod">collapseSubGraph</a> or <a href="../symbols/Group.html#expandSubGraph" class="linkMethod">expandSubGraph</a>,
and also will call the value of <a href="../symbols/Group.html#subGraphExpandedChanged" class="linkProperty">subGraphExpandedChanged</a> if it is a function.
</span><div class="details" id="dpropisSubGraphExpanded"><p>
The initial value is true -- this group's member parts are shown.
<p>
There is an analogous property for expanded/collapsed trees of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s: <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">Node.isTreeExpanded</a>.</div>
</div>
</td>
</tr>
<tr id="layout" >
<td class="name">
<div class="name">
layout
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Layout.html" class="linkConstructor">Layout</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the <a href="../symbols/Layout.html" class="linkConstructor">Layout</a> used to position all of the immediate member nodes and links in this group.<span class="nodetails" id="xproplayout"><a class="morelink" onclick="hst('proplayout')">More...</a></span> <span class="details" id="proplayout">
By default this property is an instance of <a href="../symbols/Layout.html" class="linkConstructor">Layout</a> -- no special layout is used, which just makes
sure each member node has a valid location.</span>
</div>
</td>
</tr>
<tr id="memberAdded" >
<td class="name">
<div class="name">
memberAdded
</div>
<div class="attributes">
<span class="light">{function(Group, Part) | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the function that is called after a member <a href="../symbols/Part.html" class="linkConstructor">Part</a> has been added to this Group.<span class="nodetails" id="xpropmemberAdded"><a class="morelink" onclick="hst('propmemberAdded')">More...</a></span> <span class="details" id="propmemberAdded">
It is typically used to modify the appearance of the group.
The first argument will be this Group.
The second argument will be a Part, typically a Node, but may be a simple Part or a Link.
</span><div class="details" id="dpropmemberAdded"><p>
If the value is a function, that function must not modify any membership relationships.
The member Part has already been added -- trying to remove it or adding or removing another member or the Group itself may produce undefined behavior.
<p>
The default value is null -- no function is called.</div>
</div>
</td>
</tr>
<tr id="memberParts" >
<td class="name">
<div class="name">
memberParts
</div>
<div class="attributes">
<span class="light">{Iterator.<Part>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns an iterator over the member <a href="../symbols/Part.html" class="linkConstructor">Part</a>s of this Group.<span class="nodetails" id="xpropmemberParts"><a class="morelink" onclick="hst('propmemberParts')">More...</a></span> <span class="details" id="propmemberParts">
Setting <a href="../symbols/Part.html#containingGroup" class="linkProperty">Part.containingGroup</a> to refer to this Group
will add that part to this collection.
The Parts can be <a href="../symbols/Node.html" class="linkConstructor">Node</a>s, <a href="../symbols/Link.html" class="linkConstructor">Link</a>s, <a href="../symbols/Group.html" class="linkConstructor">Group</a>s, or simple <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.
</span><div class="details" id="dpropmemberParts"><p>
A template should not have any member parts.</div>
</div>
</td>
</tr>
<tr id="memberRemoved" >
<td class="name">
<div class="name">
memberRemoved
</div>
<div class="attributes">
<span class="light">{function(Group, Part) | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the function that is called after a member <a href="../symbols/Part.html" class="linkConstructor">Part</a> has been removed from this Group.<span class="nodetails" id="xpropmemberRemoved"><a class="morelink" onclick="hst('propmemberRemoved')">More...</a></span> <span class="details" id="propmemberRemoved">
It is typically used to modify the appearance of the group.
The first argument will be this Group.
The second argument will be a Part, typically a Node, but may be a simple Part or a Link.
</span><div class="details" id="dpropmemberRemoved"><p>
If the value is a function, that function must not modify any membership relationships.
The member Part has already been removed -- trying to add it or adding or removing another member or the Group itself may produce undefined behavior.
<p>
The default value is null -- no function is called.</div>
</div>
</td>
</tr>
<tr id="memberValidation" >
<td class="name">
<div class="name">
memberValidation
</div>
<div class="attributes">
<span class="light">{function(Group, Part):boolean | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the predicate that determines whether or not a Part may become a member of this group.<span class="nodetails" id="xpropmemberValidation"><a class="morelink" onclick="hst('propmemberValidation')">More...</a></span> <span class="details" id="propmemberValidation">
If this is non-null, the predicate is called in addition to any <a href="../symbols/CommandHandler.html#memberValidation" class="linkProperty">CommandHandler.memberValidation</a> predicate.
</span><div class="details" id="dpropmemberValidation"><p>
The default predicate is null, which is equivalent to simply returning true.
The first argument will be this Group.
The second argument will be a Part, typically a Node, but will not be a Link or an Adornment.
<p>
The function, if supplied, mu