You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2411 lines
148 KiB

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CommandHandler | GoJS API</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../assets/css/bootstrap.min.css">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<!-- 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" target="api">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="tsd-page-header">
<div class="tsd-page-toolbar">
<div class="container-fluid plr15">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-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>
<a href="../index.html" class="title">GoJS API</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container-fluid plr15">
<div class="top-copyright">
<!--<b>GoJS</b>&reg; Diagramming Components<br/>version &lt;br/&gt;version 2.0.17 for TypeScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>-->
<b>GoJS</b>&reg; Diagramming Components<br/>version 2.0.17<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>
</div>
<div>
<h1>Class CommandHandler</h1>
</div>
</div>
</div>
</div>
</header>
<div class="container-fluid container-main plr15">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">CommandHandler</span>
<ul class="tsd-hierarchy">
<li>
<a href="DrawCommandHandler.html" class="tsd-signature-type">DrawCommandHandler</a>
</li>
<li>
<a href="LocalStorageCommandHandler.html" class="tsd-signature-type">LocalStorageCommandHandler</a>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<p>The <a href="Diagram.html#commandHandler">Diagram.commandHandler</a> implements various
commands such as <a href="CommandHandler.html#deleteSelection">CommandHandler.deleteSelection</a> or <a href="CommandHandler.html#redo">CommandHandler.redo</a>.
The CommandHandler includes keyboard event handling to interpret
key presses as commands.</p>
<p>CommandHandlers cannot be shared amongst multiple Diagrams.</p>
<p>You may define a CommandHandler subclass and override methods.
However you must seriously consider calling the base method in order to get its default behavior.
There may be situations where not calling the base method may cause subtle bugs,
but that depends on the method.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call a base method.</p>
<p>There is an example custom CommandHandler in the extensions directory: <a href="../../extensions/DrawCommandHandler.js">DrawCommandHandler.js</a>,
which provides alignment commands and additional behaviors for the arrow keys.</p>
<p class="boxread">
For additional discussion, please read the <a href="../../intro/commands.html">Introduction page on Commands</a>.
<h3>Keyboard Shortcuts</h3>
<p>The CommandHandler implements the following command bindings for keyboard input in <a href="CommandHandler.html#doKeyDown">doKeyDown</a>:</p>
<ul>
<li><code>Ctrl-X</code> &amp; <code>Shift-Del</code> invoke <a href="CommandHandler.html#cutSelection">cutSelection</a></li>
<li><code>Ctrl-C</code> &amp; <code>Ctrl-Insert</code> invoke <a href="CommandHandler.html#copySelection">copySelection</a></li>
<li><code>Ctrl-V</code> &amp; <code>Shift-Insert</code> invoke <a href="CommandHandler.html#pasteSelection">pasteSelection</a></li>
<li><code>Del</code> &amp; <code>Backspace</code> invoke <a href="CommandHandler.html#deleteSelection">deleteSelection</a></li>
<li><code>Ctrl-A</code> invokes <a href="CommandHandler.html#selectAll">selectAll</a></li>
<li><code>Ctrl-Z</code> &amp; <code>Alt-Backspace</code> invoke <a href="CommandHandler.html#undo">undo</a></li>
<li><code>Ctrl-Y</code> &amp; <code>Alt-Shift-Backspace</code> invoke <a href="CommandHandler.html#redo">redo</a></li>
<li><code>Up</code> &amp; <code>Down</code> &amp; <code>Left</code> &amp; <code>Right</code> (arrow keys) call <a href="Diagram.html#scroll">Diagram.scroll</a></li>
<li><code>PageUp</code> &amp; <code>PageDown</code> call <a href="Diagram.html#scroll">Diagram.scroll</a></li>
<li><code>Home</code> &amp; <code>End</code> call <a href="Diagram.html#scroll">Diagram.scroll</a></li>
<li><code>Space</code> invokes <a href="CommandHandler.html#scrollToPart">scrollToPart</a></li>
<li><code>Ctrl-- &amp; Keypad--</code> (minus) invoke <a href="CommandHandler.html#decreaseZoom">decreaseZoom</a></li>
<li><code>Ctrl-+ &amp; Keypad-+</code> (plus) invoke <a href="CommandHandler.html#increaseZoom">increaseZoom</a></li>
<li><code>Ctrl-0</code> invokes <a href="CommandHandler.html#resetZoom">resetZoom</a></li>
<li><code>Shift-Z</code> invokes <a href="CommandHandler.html#zoomToFit">zoomToFit</a>; repeat to return to the original scale and position</li>
<li><code>Ctrl-G</code> invokes <a href="CommandHandler.html#groupSelection">groupSelection</a></li>
<li><code>Ctrl-Shift-G</code> invokes <a href="CommandHandler.html#ungroupSelection">ungroupSelection</a></li>
<li><code>F2</code> invokes <a href="CommandHandler.html#editTextBlock">editTextBlock</a></li>
<li><code>Menu Key</code> invokes <a href="CommandHandler.html#showContextMenu">showContextMenu</a></li>
<li><code>Esc</code> invokes <a href="CommandHandler.html#stopCommand">stopCommand</a></li>
</ul>
<p>On a Macintosh the Command key is used as the modifier instead of the Control key.</p>
<p>On touch devices there is a default context menu that shows many commonly-used commands
when you hold a finger down on the diagram.</p>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="CommandHandler.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#archetypeGroupData" class="tsd-kind-icon">archetype<wbr>Group<wbr>Data</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#copiesConnectedLinks" class="tsd-kind-icon">copies<wbr>Connected<wbr>Links</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#copiesGroupKey" class="tsd-kind-icon">copies<wbr>Group<wbr>Key</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#copiesParentKey" class="tsd-kind-icon">copies<wbr>Parent<wbr>Key</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#copiesTree" class="tsd-kind-icon">copies<wbr>Tree</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#defaultScale" class="tsd-kind-icon">default<wbr>Scale</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#deletesConnectedLinks" class="tsd-kind-icon">deletes<wbr>Connected<wbr>Links</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#deletesTree" class="tsd-kind-icon">deletes<wbr>Tree</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="CommandHandler.html#diagram" class="tsd-kind-icon">diagram</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#memberValidation" class="tsd-kind-icon">member<wbr>Validation</a></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="CommandHandler.html#zoomFactor" class="tsd-kind-icon">zoom<wbr>Factor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#addTopLevelParts" class="tsd-kind-icon">add<wbr>Top<wbr>Level<wbr>Parts</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canCollapseSubGraph" class="tsd-kind-icon">can<wbr>Collapse<wbr>Sub<wbr>Graph</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canCollapseTree" class="tsd-kind-icon">can<wbr>Collapse<wbr>Tree</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canCopySelection" class="tsd-kind-icon">can<wbr>Copy<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canCutSelection" class="tsd-kind-icon">can<wbr>Cut<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canDecreaseZoom" class="tsd-kind-icon">can<wbr>Decrease<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canDeleteSelection" class="tsd-kind-icon">can<wbr>Delete<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canEditTextBlock" class="tsd-kind-icon">can<wbr>Edit<wbr>Text<wbr>Block</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canExpandSubGraph" class="tsd-kind-icon">can<wbr>Expand<wbr>Sub<wbr>Graph</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canExpandTree" class="tsd-kind-icon">can<wbr>Expand<wbr>Tree</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canGroupSelection" class="tsd-kind-icon">can<wbr>Group<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canIncreaseZoom" class="tsd-kind-icon">can<wbr>Increase<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canPasteSelection" class="tsd-kind-icon">can<wbr>Paste<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canRedo" class="tsd-kind-icon">can<wbr>Redo</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canResetZoom" class="tsd-kind-icon">can<wbr>Reset<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canScrollToPart" class="tsd-kind-icon">can<wbr>Scroll<wbr>ToPart</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canSelectAll" class="tsd-kind-icon">can<wbr>Select<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canShowContextMenu" class="tsd-kind-icon">can<wbr>Show<wbr>Context<wbr>Menu</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canStopCommand" class="tsd-kind-icon">can<wbr>Stop<wbr>Command</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canUndo" class="tsd-kind-icon">can<wbr>Undo</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canUngroupSelection" class="tsd-kind-icon">can<wbr>Ungroup<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#canZoomToFit" class="tsd-kind-icon">can<wbr>Zoom<wbr>ToFit</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#collapseSubGraph" class="tsd-kind-icon">collapse<wbr>Sub<wbr>Graph</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#collapseTree" class="tsd-kind-icon">collapse<wbr>Tree</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#computeEffectiveCollection" class="tsd-kind-icon">compute<wbr>Effective<wbr>Collection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#copySelection" class="tsd-kind-icon">copy<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#copyToClipboard" class="tsd-kind-icon">copy<wbr>ToClipboard</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#cutSelection" class="tsd-kind-icon">cut<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#decreaseZoom" class="tsd-kind-icon">decrease<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#deleteSelection" class="tsd-kind-icon">delete<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#doKeyDown" class="tsd-kind-icon">do<wbr>Key<wbr>Down</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#doKeyUp" class="tsd-kind-icon">do<wbr>Key<wbr>Up</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#editTextBlock" class="tsd-kind-icon">edit<wbr>Text<wbr>Block</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#expandSubGraph" class="tsd-kind-icon">expand<wbr>Sub<wbr>Graph</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#expandTree" class="tsd-kind-icon">expand<wbr>Tree</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#groupSelection" class="tsd-kind-icon">group<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#increaseZoom" class="tsd-kind-icon">increase<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#isValidMember" class="tsd-kind-icon">is<wbr>Valid<wbr>Member</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#pasteFromClipboard" class="tsd-kind-icon">paste<wbr>From<wbr>Clipboard</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#pasteSelection" class="tsd-kind-icon">paste<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#redo" class="tsd-kind-icon">redo</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#resetZoom" class="tsd-kind-icon">reset<wbr>Zoom</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#scrollToPart" class="tsd-kind-icon">scroll<wbr>ToPart</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#selectAll" class="tsd-kind-icon">select<wbr>All</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#showContextMenu" class="tsd-kind-icon">show<wbr>Context<wbr>Menu</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#stopCommand" class="tsd-kind-icon">stop<wbr>Command</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#undo" class="tsd-kind-icon">undo</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#ungroupSelection" class="tsd-kind-icon">ungroup<wbr>Selection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="CommandHandler.html#zoomToFit" class="tsd-kind-icon">zoom<wbr>ToFit</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<a name="constructor" class="tsd-anchor"></a>
<h3>
constructor
</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Command<wbr>Handler<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CommandHandler.html" class="tsd-signature-type">CommandHandler</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>The constructor produces a CommandHandler with the default key bindings.</p>
</div>
<h4 class="tsd-returns-title">Returns <a href="CommandHandler.html" class="tsd-signature-type">CommandHandler</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="archetypeGroupData" class="tsd-anchor"></a>
<h3>
archetype<wbr>Group<wbr>Data
<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type">ObjectData</a> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets a data object that is copied by <a href="CommandHandler.html#groupSelection">groupSelection</a>
when creating a new Group.</p>
<p>The default value is null.
If you set this to an Object, be sure that <a href="GraphLinksModel.html#isGroupForNodeData">GraphLinksModel.isGroupForNodeData</a> is true for that object.
Setting this property does not raise any events.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="copiesConnectedLinks" class="tsd-anchor"></a>
<h3>
copies<wbr>Connected<wbr>Links
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#copySelection">copySelection</a> should also copy Links that connect with selected Nodes.
The default value is true.
Setting this property does not raise any events.</p>
<p>The <a href="DraggingTool.html#copiesEffectiveCollection">DraggingTool.copiesEffectiveCollection</a> property serves a similar role for the <a href="DraggingTool.html">DraggingTool</a>
when the user holds down the control key to modify the drag into a copy operation.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.5</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="copiesGroupKey" class="tsd-anchor"></a>
<h3>
copies<wbr>Group<wbr>Key
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#copySelection">copySelection</a> and <a href="CommandHandler.html#copyToClipboard">copyToClipboard</a> copy the node data property
whose value is the containing group data&#39;s key.</p>
<p>Set this property to true if you want a copy/paste of a node to automatically have the new node be a member of the original group.
Caution: this only has an effect if the Diagram&#39;s <a href="Diagram.html#model">Diagram.model</a> is a <a href="GraphLinksModel.html">GraphLinksModel</a>.</p>
<p>The default value is false.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.3</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="copiesParentKey" class="tsd-anchor"></a>
<h3>
copies<wbr>Parent<wbr>Key
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#copySelection">copySelection</a> and <a href="CommandHandler.html#copyToClipboard">copyToClipboard</a> copy the node data property
whose value is the tree-parent node data&#39;s key.</p>
<p>Set this property to true if you want a copy/paste of a node to automatically have the new node be a tree-child of the original tree-parent node.
Caution: this only has an effect if the Diagram&#39;s <a href="Diagram.html#model">Diagram.model</a> is a <a href="TreeModel.html">TreeModel</a>.</p>
<p>The default value is false.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.3</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="copiesTree" class="tsd-anchor"></a>
<h3>
copies<wbr>Tree
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#copySelection">copySelection</a> should also copy subtrees.
The default value is false.
Setting this property does not raise any events.</p>
<p>The <a href="DraggingTool.html#dragsTree">DraggingTool.dragsTree</a> property serves a similar role for the <a href="DraggingTool.html">DraggingTool</a>
for both moving and copying operations.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="defaultScale" class="tsd-anchor"></a>
<h3>
default<wbr>Scale
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Deprecated in favor of <a href="Diagram.html#defaultScale">Diagram.defaultScale</a>.</p>
<p>Gets or sets the <a href="Diagram.html#scale">Diagram.scale</a> set by <a href="CommandHandler.html#resetZoom">resetZoom</a>.</p>
<p>The default value is 1.0.
The value must be a number larger than 0.
Setting this property does not raise any events.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.3</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="deletesConnectedLinks" class="tsd-anchor"></a>
<h3>
deletes<wbr>Connected<wbr>Links
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#deleteSelection">deleteSelection</a> should also delete links that are connected to nodes that are deleted.
The default value is true.
Setting this property does not raise any events.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.6</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="deletesTree" class="tsd-anchor"></a>
<h3>
deletes<wbr>Tree
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets whether <a href="CommandHandler.html#deleteSelection">deleteSelection</a> should also delete subtrees.
The default value is false.
Setting this property does not raise any events.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
<a name="diagram" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagReadOnly">Read-only</span>
diagram
<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This read-only property returns the <a href="Diagram.html">Diagram</a> that is using this CommandHandler,
after <a href="Diagram.html#commandHandler">Diagram.commandHandler</a> has been set to this object.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="memberValidation" class="tsd-anchor"></a>
<h3>
member<wbr>Validation
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">aGroup</span><span class="tsd-signature-symbol">: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">somePart</span><span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets the predicate that determines whether or not a node may become a member of a group.
This predicate is called in addition to any existing group&#39;s <a href="Group.html#memberValidation">Group.memberValidation</a> predicate.
The default predicate is null, which is equivalent to simply returning true.
The predicate may be called passing null as the first argument (the Group) --
this asks whether it is OK to make the second argument (the Part, but not a Link) a top-level Part of the diagram.</p>
<p class="box">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
<p>The function, if supplied, must not have any side-effects.</p>
</div>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
<a name="zoomFactor" class="tsd-anchor"></a>
<h3>
zoom<wbr>Factor
<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Gets or sets the amount by which <a href="CommandHandler.html#decreaseZoom">decreaseZoom</a> and <a href="CommandHandler.html#increaseZoom">increaseZoom</a> change
the <a href="Diagram.html#scale">Diagram.scale</a>.</p>
<p>The default value is 1.05 (5%).
The value must be a number larger than 1.0.
Setting this property does not raise any events.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>1.1</p>
</dd>
</dl>
</div>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="addTopLevelParts" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
add<wbr>Top<wbr>Level<wbr>Parts
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">add<wbr>Top<wbr>Level<wbr>Parts<span class="tsd-signature-symbol">(</span>coll<span class="tsd-signature-symbol">: </span><a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span>, check<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Make sure all of the unnested <a href="Part.html">Part</a>s in the given collection
are removed from any containing <a href="Group.html">Group</a>s.</p>
<p>This sets <a href="Part.html#containingGroup">Part.containingGroup</a> to null on each Part that is
not a member of another Part in the argument collection.
If the check argument to this method is supplied and true,
this will call <a href="CommandHandler.html#isValidMember">isValidMember</a> on each part, passing null as the first argument.</p>
<p>This functionality is similar to <a href="CommandHandler.html#ungroupSelection">ungroupSelection</a>,
except that this is not a command (there is no transaction and this does not raise a <a href="DiagramEvent.html">DiagramEvent</a>)
and the parts are necessarily becoming top-level parts
(whereas ungrouping would add them to the Group containing the Group being ungrouped).</p>
<p>This function is typically called in a <a href="Diagram.html#mouseDrop">Diagram.mouseDrop</a> event handler
in order to remove the selected Parts from whatever <a href="Group.html">Group</a> they had been in.</p>
<p>If you want to add Parts to be members of a Group, call <a href="Group.html#addMembers">Group.addMembers</a>.
If you want to remove Parts completely from a Diagram, call <a href="Diagram.html#removeParts">Diagram.removeParts</a>.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>coll: <a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>a collection of Parts.</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> check: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography">
<p>whether to call <a href="CommandHandler.html#isValidMember">isValidMember</a> to confirm that changing the Part to be a top-level Part is valid.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true if all non-Links were changed to be top-level Parts in this Diagram; false if some Parts or Nodes were not able to be added.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canCollapseSubGraph" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Collapse<wbr>Sub<wbr>Graph
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Collapse<wbr>Sub<wbr>Graph<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether the user can collapse expanded <a href="Group.html">Group</a>s.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#collapseSubGraph">collapseSubGraph</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider collapsing this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canCollapseTree" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Collapse<wbr>Tree
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Collapse<wbr>Tree<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">?: </span><a href="Node.html" class="tsd-signature-type">Node</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether the user can collapse expanded subtrees of <a href="Node.html">Node</a>s.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#collapseTree">collapseTree</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> node: <a href="Node.html" class="tsd-signature-type">Node</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider collapsing this particular Node.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canCopySelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Copy<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Copy<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#copySelection">copySelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#copySelection">copySelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if <a href="Diagram.html#allowCopy">Diagram.allowCopy</a> is true,
if <a href="Diagram.html#allowClipboard">Diagram.allowClipboard</a> is true, and
if there are some selected <a href="Part.html">Part</a>s.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canCutSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Cut<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Cut<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#cutSelection">cutSelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#cutSelection">cutSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowCopy">Diagram.allowCopy</a> is true,
if <a href="Diagram.html#allowDelete">Diagram.allowDelete</a> is true,
if <a href="Diagram.html#allowClipboard">Diagram.allowClipboard</a> is true, and
if there are some selected <a href="Part.html">Part</a>s.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canDecreaseZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Decrease<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Decrease<wbr>Zoom<span class="tsd-signature-symbol">(</span>factor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#decreaseZoom">decreaseZoom</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#decreaseZoom">decreaseZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> factor: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to 1/<a href="CommandHandler.html#zoomFactor">zoomFactor</a>. The value should be less than one and greater than zero.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowZoom">Diagram.allowZoom</a> is true
and if the new scale is within the range of <a href="Diagram.html#minScale">Diagram.minScale</a> and <a href="Diagram.html#maxScale">Diagram.maxScale</a>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canDeleteSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Delete<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Delete<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#deleteSelection">deleteSelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#deleteSelection">deleteSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowDelete">Diagram.allowDelete</a> is true, and
if there are some selected <a href="Part.html">Part</a>s.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canEditTextBlock" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Edit<wbr>Text<wbr>Block
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Edit<wbr>Text<wbr>Block<span class="tsd-signature-symbol">(</span>textblock<span class="tsd-signature-symbol">?: </span><a href="TextBlock.html" class="tsd-signature-type">TextBlock</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#editTextBlock">editTextBlock</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#editTextBlock">editTextBlock</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> textblock: <a href="TextBlock.html" class="tsd-signature-type">TextBlock</a></h5>
<div class="tsd-comment tsd-typography">
<p>the <a href="TextBlock.html">TextBlock</a> to consider editing.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowTextEdit">Diagram.allowTextEdit</a> is true,
if there is a <a href="ToolManager.html#textEditingTool">ToolManager.textEditingTool</a>, and
if there is any selected <a href="Part.html">Part</a> for which <a href="Part.html#canEdit">Part.canEdit</a> is true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canExpandSubGraph" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Expand<wbr>Sub<wbr>Graph
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Expand<wbr>Sub<wbr>Graph<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether the user can expand collapsed <a href="Group.html">Group</a>s.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#expandSubGraph">expandSubGraph</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider expanding this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canExpandTree" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Expand<wbr>Tree
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Expand<wbr>Tree<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">?: </span><a href="Node.html" class="tsd-signature-type">Node</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether the user can expand collapsed subtrees of <a href="Node.html">Node</a>s.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#expandTree">expandTree</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> node: <a href="Node.html" class="tsd-signature-type">Node</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider expanding this particular Node.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canGroupSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Group<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Group<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#groupSelection">groupSelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#groupSelection">groupSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the <a href="CommandHandler.html#archetypeGroupData">archetypeGroupData</a> is not null,
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowInsert">Diagram.allowInsert</a> is true,
if <a href="Diagram.html#allowGroup">Diagram.allowGroup</a> is true,
if <a href="Diagram.html#model">Diagram.model</a> is a <a href="GraphLinksModel.html">GraphLinksModel</a>, and
if there is any selected <a href="Part.html">Part</a> that can be <a href="Part.html#canGroup">Part.canGroup</a>ed.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canIncreaseZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Increase<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Increase<wbr>Zoom<span class="tsd-signature-symbol">(</span>factor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#increaseZoom">increaseZoom</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#increaseZoom">increaseZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> factor: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to <a href="CommandHandler.html#zoomFactor">zoomFactor</a>. The value should be greater than one.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowZoom">Diagram.allowZoom</a> is true
and if the new scale is within the range of <a href="Diagram.html#minScale">Diagram.minScale</a> and <a href="Diagram.html#maxScale">Diagram.maxScale</a>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canPasteSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Paste<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Paste<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#pasteSelection">pasteSelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#pasteSelection">pasteSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowInsert">Diagram.allowInsert</a> is true,
if <a href="Diagram.html#allowClipboard">Diagram.allowClipboard</a> is true, and
if the clipboard has parts in it.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canRedo" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Redo
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Redo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#redo">redo</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#redo">redo</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowUndo">Diagram.allowUndo</a> is true, and
if the <a href="UndoManager.html#canRedo">UndoManager.canRedo</a> predicate returns true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canResetZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Reset<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Reset<wbr>Zoom<span class="tsd-signature-symbol">(</span>newscale<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#resetZoom">resetZoom</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#resetZoom">resetZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> newscale: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to <a href="CommandHandler.html#defaultScale">defaultScale</a>, which is normally 1.0. The value should be greater than zero.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowZoom">Diagram.allowZoom</a> is true.
and if the new scale is within the range of <a href="Diagram.html#minScale">Diagram.minScale</a> and <a href="Diagram.html#maxScale">Diagram.maxScale</a>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canScrollToPart" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Scroll<wbr>ToPart
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Scroll<wbr>ToPart<span class="tsd-signature-symbol">(</span>part<span class="tsd-signature-symbol">?: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#scrollToPart">scrollToPart</a> command.
This returns false if there is no argument Part and there are no selected Parts.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#scrollToPart">scrollToPart</a></p>
</dd>
<dt>since</dt>
<dd><p>1.6</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to the first selected Part of <a href="Diagram.html#selection">Diagram.selection</a></p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowHorizontalScroll">Diagram.allowHorizontalScroll</a> and <a href="Diagram.html#allowVerticalScroll">Diagram.allowVerticalScroll</a> are true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canSelectAll" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Select<wbr>All
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Select<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#selectAll">selectAll</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#selectAll">selectAll</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowSelect">Diagram.allowSelect</a> is true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canShowContextMenu" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Show<wbr>Context<wbr>Menu
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Show<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">?: </span><a href="GraphObject.html" class="tsd-signature-type">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#showContextMenu">showContextMenu</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#showContextMenu">showContextMenu</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> obj: <a href="GraphObject.html" class="tsd-signature-type">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a></h5>
<div class="tsd-comment tsd-typography">
<p>a GraphObject or Diagram with a contextMenu defined.
If none is given, this method will use the first selected object, or else the Diagram.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canStopCommand" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Stop<wbr>Command
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Stop<wbr>Command<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether the user may stop the current tool.
This just returns true.</p>
<p>This method may be overridden, but probably should not be overridden.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#stopCommand">stopCommand</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canUndo" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Undo
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Undo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#undo">undo</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#undo">undo</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowUndo">Diagram.allowUndo</a> is true, and
if the <a href="UndoManager.html#canUndo">UndoManager.canUndo</a> predicate returns true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canUngroupSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Ungroup<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Ungroup<wbr>Selection<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#ungroupSelection">ungroupSelection</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#ungroupSelection">ungroupSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider ungrouping this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true:
if the diagram is not <a href="Diagram.html#isReadOnly">Diagram.isReadOnly</a>,
if <a href="Diagram.html#allowDelete">Diagram.allowDelete</a> is true,
if <a href="Diagram.html#allowUngroup">Diagram.allowUngroup</a> is true,
if <a href="Diagram.html#model">Diagram.model</a> is a <a href="GraphLinksModel.html">GraphLinksModel</a>, and
if there are any selected <a href="Group.html">Group</a>s that are <a href="Group.html#ungroupable">Group.ungroupable</a>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="canZoomToFit" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
can<wbr>Zoom<wbr>ToFit
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">can<wbr>Zoom<wbr>ToFit<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate controls whether or not the user can invoke the <a href="CommandHandler.html#zoomToFit">zoomToFit</a> command.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#zoomToFit">zoomToFit</a></p>
</dd>
<dt>since</dt>
<dd><p>1.1</p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>This returns true if <a href="Diagram.html#allowZoom">Diagram.allowZoom</a> is true.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="collapseSubGraph" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
collapse<wbr>Sub<wbr>Graph
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">collapse<wbr>Sub<wbr>Graph<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command collapses all expanded selected <a href="Group.html">Group</a>s.
This operation is performed within a &quot;Collapse SubGraph&quot; transaction.
Just before the end of the transaction this raises the &quot;SubGraphCollapsed&quot; <a href="DiagramEvent.html">DiagramEvent</a>,
with a collection of collapsed <a href="Group.html">Group</a>s as the subject.
This currently has no default keyboard shortcut.</p>
<p>This calls <a href="Group.html#collapseSubGraph">Group.collapseSubGraph</a> to perform the collapse, which will set <a href="Group.html#isSubGraphExpanded">Group.isSubGraphExpanded</a> to false.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;isSubGraphExpanded&quot; property of your Groups,
and perhaps also on the <a href="Group.html#wasSubGraphExpanded">Group.wasSubGraphExpanded</a> property.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canCollapseSubGraph">canCollapseSubGraph</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and collapse this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="collapseTree" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
collapse<wbr>Tree
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">collapse<wbr>Tree<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">?: </span><a href="Node.html" class="tsd-signature-type">Node</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command collapses all expanded selected <a href="Node.html">Node</a>s.
This operation is performed within a &quot;Collapse Tree&quot; transaction.
Just before the end of the transaction this raises the &quot;TreeCollapsed&quot; <a href="DiagramEvent.html">DiagramEvent</a>,
with a collection of collapsed <a href="Node.html">Node</a>s as the subject.
This currently has no default keyboard shortcut.</p>
<p>This calls <a href="Node.html#collapseTree">Node.collapseTree</a> to perform the collapse, which will set <a href="Node.html#isTreeExpanded">Node.isTreeExpanded</a> to false.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;isTreeExpanded&quot; property of your Nodes,
and perhaps also on the <a href="Node.html#wasTreeExpanded">Node.wasTreeExpanded</a> property.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canCollapseTree">canCollapseTree</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> node: <a href="Node.html" class="tsd-signature-type">Node</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and collapse this particular Node subtree.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="computeEffectiveCollection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
compute<wbr>Effective<wbr>Collection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">compute<wbr>Effective<wbr>Collection<span class="tsd-signature-symbol">(</span>parts<span class="tsd-signature-symbol">: </span><a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span>, options<span class="tsd-signature-symbol">?: </span><a href="DraggingOptions.html" class="tsd-signature-type">DraggingOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Find the actual collection of nodes and links to be moved or copied,
given an initial collection.
This includes links that connected at both ends to nodes being moved or copied,
members of <a href="Group.html">Group</a>s, and if <a href="DraggingTool.html#dragsTree">DraggingTool.dragsTree</a> is true,
this includes nodes and links that are &quot;tree&quot; descendants from selected nodes.</p>
<p>Note that this does not return a simple collection of <a href="Part.html">Part</a>s,
but a <a href="Map.html">Map</a> associating a chosen <a href="Part.html">Part</a>
with an Object holding its original location Points as the value of the &quot;point&quot; property.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<p>This was moved to CommandHandler from <a href="DraggingTool.html">DraggingTool</a> in 2.0.</p>
<dl class="tsd-comment-tags">
<dt>since</dt>
<dd><p>2.0</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parts: <a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>A <a href="Set.html">Set</a> or <a href="List.html">List</a> of <a href="Part.html">Part</a>s.</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="DraggingOptions.html" class="tsd-signature-type">DraggingOptions</a></h5>
<div class="tsd-comment tsd-typography">
<p>Potential options for the collection computation. If not specified, this uses the DraggingTool&#39;s drag options.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="Map.html" class="tsd-signature-type">Map</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">, </span><a href="DraggingInfo.html" class="tsd-signature-type">DraggingInfo</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>a Map mapping <a href="Part.html">Part</a>s to DraggingInfo Objects
that have a &quot;point&quot; property remembering the original location of that Part.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="copySelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
copy<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">copy<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command copies the currently selected parts, <a href="Diagram.html#selection">Diagram.selection</a>, from the <a href="Diagram.html">Diagram</a> into the clipboard.
This is normally invoked by the <code>Ctrl-C</code> keyboard shortcut.</p>
<p>This makes a copy of the current selection by calling <a href="CommandHandler.html#copyToClipboard">copyToClipboard</a>.
This also raises the &quot;ClipboardChanged&quot; diagram event.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canCopySelection">canCopySelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="copyToClipboard" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
copy<wbr>ToClipboard
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">copy<wbr>ToClipboard<span class="tsd-signature-symbol">(</span>coll<span class="tsd-signature-symbol">: </span><a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>Make a copy of the given collection of <a href="Part.html">Part</a>s
and stores it in a static variable acting as the clipboard.</p>
<p>The clipboard is initially null.
It can hold a collection of copied <a href="Part.html">Part</a>s.
It also remembers the <a href="Model.html#dataFormat">Model.dataFormat</a> of the diagram
from which the parts were copied.</p>
<p>This calls <a href="Diagram.html#copyParts">Diagram.copyParts</a> in order to make a copy of the Parts for the clipboard.
The values of <a href="CommandHandler.html#copiesParentKey">copiesParentKey</a> and <a href="CommandHandler.html#copiesGroupKey">copiesGroupKey</a> affect whether
a copied node data remembers its tree parent node (if in a <a href="TreeModel.html">TreeModel</a>) or
its containing group (if in a <a href="GraphLinksModel.html">GraphLinksModel</a>).</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#pasteFromClipboard">pasteFromClipboard</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>coll: <a href="Iterable.html" class="tsd-signature-type">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>A collection of <a href="Part.html">Part</a>s.
If the value is null, the clipboard is cleared of all data.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="cutSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
cut<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">cut<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command executes a <a href="CommandHandler.html#copySelection">copySelection</a> followed by a <a href="CommandHandler.html#deleteSelection">deleteSelection</a>.
This is normally invoked by the <code>Ctrl-X</code> keyboard shortcut.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canCutSelection">canCutSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="decreaseZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
decrease<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">decrease<wbr>Zoom<span class="tsd-signature-symbol">(</span>factor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command decreases the <a href="Diagram.html#scale">Diagram.scale</a> by a given factor.
This is normally invoked by the <code>Ctrl--</code> and <code>Keypad--</code> keyboard shortcuts.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canDecreaseZoom">canDecreaseZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> factor: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to 1/<a href="CommandHandler.html#zoomFactor">zoomFactor</a>. The value should be less than one and greater than zero.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="deleteSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
delete<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">delete<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command deletes the currently selected parts from the diagram.
This is normally invoked by the <code>Del</code> keyboard shortcut.</p>
<p>This will first start a &quot;Delete&quot; transaction, then
raise the &quot;SelectionDeleting&quot; <a href="DiagramEvent.html">DiagramEvent</a>,
call <a href="Diagram.html#removeParts">Diagram.removeParts</a> on a perhaps extended collection of selected Parts,
raise the &quot;SelectionDeleted&quot; diagram event,
and finally commit the transaction.</p>
<p>Because this command changes the selection,
this method also raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
All changes are performed within a transaction.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canDeleteSelection">canDeleteSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="doKeyDown" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
do<wbr>Key<wbr>Down
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">do<wbr>Key<wbr>Down<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This is called by tools to handle keyboard commands.
For most commands, this calls the &quot;can...&quot; predicate; if that returns true it calls the command method.
If GoJS handles a key-down event as a keyboard command, the underlying event will not bubble.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<p>There is an example custom CommandHandler in the extensions directory: <a href="../../extensions/DrawCommandHandler.js">DrawCommandHandler.js</a>,
which implements additional behaviors for the arrow keys by overriding this method.
For additional discussion, please read the <a href="../../intro/commands.html">Introduction page on Commands</a>.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="doKeyUp" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
do<wbr>Key<wbr>Up
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">do<wbr>Key<wbr>Up<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This is called by tools to handle keyboard commands.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="editTextBlock" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
edit<wbr>Text<wbr>Block
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">edit<wbr>Text<wbr>Block<span class="tsd-signature-symbol">(</span>textblock<span class="tsd-signature-symbol">?: </span><a href="TextBlock.html" class="tsd-signature-type">TextBlock</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command starts in-place editing of a <a href="TextBlock.html">TextBlock</a> in the selected <a href="Part.html">Part</a>.
This is normally invoked by the <code>F2</code> keyboard shortcut.</p>
<p>This starts the <a href="TextEditingTool.html">TextEditingTool</a> to have the user enter or modify the text string and finally set the <a href="TextBlock.html#text">TextBlock.text</a>.
You may want to save the new string to the model by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;text&quot; property of your TextBlock.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canEditTextBlock">canEditTextBlock</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> textblock: <a href="TextBlock.html" class="tsd-signature-type">TextBlock</a></h5>
<div class="tsd-comment tsd-typography">
<p>the <a href="TextBlock.html">TextBlock</a> to start editing.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="expandSubGraph" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
expand<wbr>Sub<wbr>Graph
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">expand<wbr>Sub<wbr>Graph<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command expands all collapsed selected <a href="Group.html">Group</a>s.
This operation is performed within an &quot;Expand SubGraph&quot; transaction.
Just before the end of the transaction this raises the &quot;SubGraphExpanded&quot; <a href="DiagramEvent.html">DiagramEvent</a>,
with a collection of expanded <a href="Group.html">Group</a>s as the subject.
This currently has no default keyboard shortcut.</p>
<p>This calls <a href="Group.html#expandSubGraph">Group.expandSubGraph</a> to perform the collapse, which will set <a href="Group.html#isSubGraphExpanded">Group.isSubGraphExpanded</a> to true.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;isSubGraphExpanded&quot; property of your Groups,
and perhaps also on the <a href="Group.html#wasSubGraphExpanded">Group.wasSubGraphExpanded</a> property.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canExpandSubGraph">canExpandSubGraph</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and expand this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="expandTree" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
expand<wbr>Tree
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">expand<wbr>Tree<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">?: </span><a href="Node.html" class="tsd-signature-type">Node</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command expands all collapsed selected <a href="Node.html">Node</a>s.
This operation is performed within an &quot;Expand Tree&quot; transaction.
Just before the end of the transaction this raises the &quot;TreeExpanded&quot; <a href="DiagramEvent.html">DiagramEvent</a>,
with a collection of expanded <a href="Node.html">Node</a>s as the subject.
This currently has no default keyboard shortcut.</p>
<p>This calls <a href="Node.html#expandTree">Node.expandTree</a> to perform the expand, which will set <a href="Node.html#isTreeExpanded">Node.isTreeExpanded</a> to true.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="Binding.html">Binding</a> on the &quot;isTreeExpanded&quot; property of your Nodes,
and perhaps also on the <a href="Node.html#wasTreeExpanded">Node.wasTreeExpanded</a> property.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canExpandTree">canExpandTree</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> node: <a href="Node.html" class="tsd-signature-type">Node</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and collapse this particular Node subtree.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="groupSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
group<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">group<wbr>Selection<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command adds a copy of <a href="CommandHandler.html#archetypeGroupData">archetypeGroupData</a> to the diagram&#39;s model
to create a new <a href="Group.html">Group</a> and then adds the selected <a href="Part.html">Part</a>s to that new group.
This is normally invoked by the <code>Ctrl-G</code> keyboard shortcut.</p>
<p>This creates a new <a href="Group.html">Group</a> by adding a copy of the <a href="CommandHandler.html#archetypeGroupData">archetypeGroupData</a> to the model.
Each of the selected parts for which <a href="Part.html#canGroup">Part.canGroup</a> is true
and for which <a href="CommandHandler.html#isValidMember">isValidMember</a> is true
is made a member of that new group.
If all of the selected groupable parts were members of a pre-existing group,
the new group also becomes a member of that pre-existing group,
if <a href="CommandHandler.html#isValidMember">isValidMember</a> is true for that existing group with the new group.
The new group becomes the only selected part.
This raises the &quot;SelectionGrouped&quot; diagram event.
This method also raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
All of the changes are performed in a &quot;Group&quot; transaction.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canGroupSelection">canGroupSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="increaseZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
increase<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">increase<wbr>Zoom<span class="tsd-signature-symbol">(</span>factor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command increases the <a href="Diagram.html#scale">Diagram.scale</a> by a given factor.
This is normally invoked by the <code>Ctrl-+</code> and <code>Keypad-+</code> keyboard shortcuts.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canIncreaseZoom">canIncreaseZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> factor: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to <a href="CommandHandler.html#zoomFactor">zoomFactor</a>. The value should be greater than one.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="isValidMember" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
is<wbr>Valid<wbr>Member
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">is<wbr>Valid<wbr>Member<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">: </span><a href="Group.html" class="tsd-signature-type">Group</a>, part<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This predicate is called to determine whether a Node may be added as a member of a Group.
This always checks to make sure no group might become a member of itself, either directly or indirectly.
If the Group has a <a href="Group.html#memberValidation">Group.memberValidation</a> predicate and if it returns false, this method returns false.
If this CommandHandler has a <a href="CommandHandler.html#memberValidation">memberValidation</a> predicate and if it returns false, this method returns false.
Otherwise this will return true.</p>
<p class="box">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>this may be null if the node is being added as a top-level node.</p>
</div>
</li>
<li>
<h5>part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>a Part, usually a Node, possibly another Group, but not a Link or an Adornment.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true if OK to add the node to the group.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="pasteFromClipboard" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
paste<wbr>From<wbr>Clipboard
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">paste<wbr>From<wbr>Clipboard<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Set.html" class="tsd-signature-type">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>If the clipboard holds a collection of <a href="Part.html">Part</a>s,
and if the <a href="Model.html#dataFormat">Model.dataFormat</a> matches that stored in the clipboard,
this makes a copy of the clipboard&#39;s parts and adds the copies to this <a href="Diagram.html">Diagram</a>.</p>
<p>This calls <a href="Diagram.html#copyParts">Diagram.copyParts</a> in order to make a copy of the Parts in the clipboard and add them to this diagram.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#copyToClipboard">copyToClipboard</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <a href="Set.html" class="tsd-signature-type">Set</a><span class="tsd-signature-symbol">&lt;</span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>a collection of the newly pasted <a href="Part.html">Part</a>s,
or an empty Set if there was no data in the clipboard.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="pasteSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
paste<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">paste<wbr>Selection<span class="tsd-signature-symbol">(</span>pos<span class="tsd-signature-symbol">?: </span><a href="Point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command copies the contents of the clipboard into this diagram and makes those new parts the new selection.
This is normally invoked by the <code>Ctrl-V</code> keyboard shortcut.</p>
<p>This calls <a href="CommandHandler.html#pasteFromClipboard">pasteFromClipboard</a> to add copies of <a href="Part.html">Part</a>s
into this diagram, and then selects all of the newly created parts.
This also raises the &quot;ClipboardPasted&quot; diagram event.
This method raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
All of the changes are performed in a transaction.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canPasteSelection">canPasteSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> pos: <a href="Point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>Point at which to center the newly pasted parts; if not present the parts are not moved.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="redo" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
redo
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">redo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command calls <a href="UndoManager.html#redo">UndoManager.redo</a>.
This is normally invoked by the <code>Ctrl-Y</code> keyboard shortcut.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canRedo">canRedo</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="resetZoom" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
reset<wbr>Zoom
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">reset<wbr>Zoom<span class="tsd-signature-symbol">(</span>newscale<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command sets the <a href="Diagram.html#scale">Diagram.scale</a> to a new scale value, by default 1.
This is normally invoked by the <code>Ctrl-0</code> keyboard shortcut.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canResetZoom">canResetZoom</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> newscale: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to <a href="CommandHandler.html#defaultScale">defaultScale</a>, which is normally 1.0. The value should be greater than zero.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="scrollToPart" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
scroll<wbr>ToPart
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">scroll<wbr>ToPart<span class="tsd-signature-symbol">(</span>part<span class="tsd-signature-symbol">?: </span><a href="Part.html" class="tsd-signature-type">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command scrolls the diagram to make a highlighted or selected Part visible in the viewport.
Call this command repeatedly to cycle through the <a href="Diagram.html#highlighteds">Diagram.highlighteds</a> collection,
if there are any Parts in that collection, or else in the <a href="Diagram.html#selection">Diagram.selection</a> collection,
scrolling to each one in turn by calling <a href="Diagram.html#centerRect">Diagram.centerRect</a>.</p>
<p>This is normally invoked by the <code>Space</code> keyboard shortcut.
If there is no argument and there is no highlighted or selected Part, this command does nothing.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canScrollToPart">canScrollToPart</a></p>
</dd>
<dt>since</dt>
<dd><p>1.6</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> part: <a href="Part.html" class="tsd-signature-type">Part</a></h5>
<div class="tsd-comment tsd-typography">
<p>This defaults to the first highlighted Part of <a href="Diagram.html#highlighteds">Diagram.highlighteds</a>,
or, if there are no highlighted Parts, the first selected Part.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="selectAll" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
select<wbr>All
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">select<wbr>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command selects all of the selectable <a href="Part.html">Part</a>s in the diagram by setting <a href="Part.html#isSelected">Part.isSelected</a> to true on each one.
This is normally invoked by the <code>Ctrl-A</code> keyboard shortcut.</p>
<p>This method raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
This ignores all parts in temporary layers.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canSelectAll">canSelectAll</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="showContextMenu" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
show<wbr>Context<wbr>Menu
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">show<wbr>Context<wbr>Menu<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">?: </span><a href="GraphObject.html" class="tsd-signature-type">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command opens the context menu for a selected Part or given GraphObject, or else for the whole Diagram.
This is normally invoked by the <code>Menu</code> keyboard shortcut.</p>
<p>The given GraphObject must have a <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>
defined in order to show anything.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canShowContextMenu">canShowContextMenu</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> obj: <a href="GraphObject.html" class="tsd-signature-type">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type">Diagram</a></h5>
<div class="tsd-comment tsd-typography">
<p>a GraphObject or Diagram with a contextMenu defined.
If none is given, this method will use the first selected object, or else the Diagram.
The method will simulate a right-button click at the middle of the GraphObject or,
if a Diagram, at the current mouse position if it is in the viewport.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="stopCommand" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
stop<wbr>Command
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">stop<wbr>Command<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command cancels the operation of the current tool.
This is typically called when the user presses ESCAPE.</p>
<p>If the current tool is a <a href="ToolManager.html">ToolManager</a>, this clears the diagram&#39;s selection.
This then calls <a href="Tool.html#doCancel">Tool.doCancel</a> on the current tool.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canStopCommand">canStopCommand</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="undo" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
undo
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">undo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command calls <a href="UndoManager.html#undo">UndoManager.undo</a>.
This is normally invoked by the <code>Ctrl-Z</code> keyboard shortcut.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canUndo">canUndo</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="ungroupSelection" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
ungroup<wbr>Selection
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">ungroup<wbr>Selection<span class="tsd-signature-symbol">(</span>group<span class="tsd-signature-symbol">?: </span><a href="Group.html" class="tsd-signature-type">Group</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command removes selected groups from the diagram without removing their members from the diagram.
This is normally invoked by the <code>Ctrl-Shift-G</code> keyboard shortcut.</p>
<p>For the given group, or if not supplied, each selected <a href="Group.html">Group</a> that is <a href="Group.html#ungroupable">Group.ungroupable</a>,
expand the subgraph and change all of its member parts to be members of the group that the selected group node is in.
(If the selected group is a top-level node, i.e. not a member of any group node, its members become top-level parts too.)
All of those selected groups are deleted.
All of the reparented member parts are selected.</p>
<p>This raises the &quot;SelectionUngrouped&quot; diagram event.
This method also raises the &quot;ChangingSelection&quot; and &quot;ChangedSelection&quot; diagram events.
All of the changes are performed in an &quot;Ungroup&quot; transaction.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canUngroupSelection">canUngroupSelection</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> group: <a href="Group.html" class="tsd-signature-type">Group</a></h5>
<div class="tsd-comment tsd-typography">
<p>if supplied, ignore the selection and consider ungrouping this particular Group.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="zoomToFit" class="tsd-anchor"></a>
<h3>
<span class="tsd-flag ts-flagVirtual">Virtual</span>
zoom<wbr>ToFit
</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">zoom<wbr>ToFit<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>This command changes the <a href="Diagram.html#scale">Diagram.scale</a> so that the <a href="Diagram.html#documentBounds">Diagram.documentBounds</a> fits within the viewport.
If this command had been called before without any other zooming since then,
the original Diagram scale and position are restored.
This is normally invoked by the <code>Shift-Z</code> keyboard shortcut.</p>
<p>This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="CommandHandler.html#canZoomToFit">canZoomToFit</a></p>
</dd>
<dt>since</dt>
<dd><p>1.1</p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../index.html"><em>GoJS <wbr>Class <wbr>Index</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class">
<a href="CommandHandler.html" class="tsd-kind-icon">Command<wbr>Handler</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="CommandHandler.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#archetypeGroupData" class="tsd-kind-icon">archetype<wbr>Group<wbr>Data</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#copiesConnectedLinks" class="tsd-kind-icon">copies<wbr>Connected<wbr>Links</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#copiesGroupKey" class="tsd-kind-icon">copies<wbr>Group<wbr>Key</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#copiesParentKey" class="tsd-kind-icon">copies<wbr>Parent<wbr>Key</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#copiesTree" class="tsd-kind-icon">copies<wbr>Tree</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#defaultScale" class="tsd-kind-icon">default<wbr>Scale</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#deletesConnectedLinks" class="tsd-kind-icon">deletes<wbr>Connected<wbr>Links</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#deletesTree" class="tsd-kind-icon">deletes<wbr>Tree</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class">
<a href="CommandHandler.html#diagram" class="tsd-kind-icon">diagram</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#memberValidation" class="tsd-kind-icon">member<wbr>Validation</a>
</li>
<li class=" tsd-kind-accessor tsd-parent-kind-class">
<a href="CommandHandler.html#zoomFactor" class="tsd-kind-icon">zoom<wbr>Factor</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#addTopLevelParts" class="tsd-kind-icon">add<wbr>Top<wbr>Level<wbr>Parts</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canCollapseSubGraph" class="tsd-kind-icon">can<wbr>Collapse<wbr>Sub<wbr>Graph</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canCollapseTree" class="tsd-kind-icon">can<wbr>Collapse<wbr>Tree</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canCopySelection" class="tsd-kind-icon">can<wbr>Copy<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canCutSelection" class="tsd-kind-icon">can<wbr>Cut<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canDecreaseZoom" class="tsd-kind-icon">can<wbr>Decrease<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canDeleteSelection" class="tsd-kind-icon">can<wbr>Delete<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canEditTextBlock" class="tsd-kind-icon">can<wbr>Edit<wbr>Text<wbr>Block</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canExpandSubGraph" class="tsd-kind-icon">can<wbr>Expand<wbr>Sub<wbr>Graph</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canExpandTree" class="tsd-kind-icon">can<wbr>Expand<wbr>Tree</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canGroupSelection" class="tsd-kind-icon">can<wbr>Group<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canIncreaseZoom" class="tsd-kind-icon">can<wbr>Increase<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canPasteSelection" class="tsd-kind-icon">can<wbr>Paste<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canRedo" class="tsd-kind-icon">can<wbr>Redo</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canResetZoom" class="tsd-kind-icon">can<wbr>Reset<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canScrollToPart" class="tsd-kind-icon">can<wbr>Scroll<wbr>ToPart</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canSelectAll" class="tsd-kind-icon">can<wbr>Select<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canShowContextMenu" class="tsd-kind-icon">can<wbr>Show<wbr>Context<wbr>Menu</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canStopCommand" class="tsd-kind-icon">can<wbr>Stop<wbr>Command</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canUndo" class="tsd-kind-icon">can<wbr>Undo</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canUngroupSelection" class="tsd-kind-icon">can<wbr>Ungroup<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#canZoomToFit" class="tsd-kind-icon">can<wbr>Zoom<wbr>ToFit</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#collapseSubGraph" class="tsd-kind-icon">collapse<wbr>Sub<wbr>Graph</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#collapseTree" class="tsd-kind-icon">collapse<wbr>Tree</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#computeEffectiveCollection" class="tsd-kind-icon">compute<wbr>Effective<wbr>Collection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#copySelection" class="tsd-kind-icon">copy<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#copyToClipboard" class="tsd-kind-icon">copy<wbr>ToClipboard</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#cutSelection" class="tsd-kind-icon">cut<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#decreaseZoom" class="tsd-kind-icon">decrease<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#deleteSelection" class="tsd-kind-icon">delete<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#doKeyDown" class="tsd-kind-icon">do<wbr>Key<wbr>Down</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#doKeyUp" class="tsd-kind-icon">do<wbr>Key<wbr>Up</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#editTextBlock" class="tsd-kind-icon">edit<wbr>Text<wbr>Block</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#expandSubGraph" class="tsd-kind-icon">expand<wbr>Sub<wbr>Graph</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#expandTree" class="tsd-kind-icon">expand<wbr>Tree</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#groupSelection" class="tsd-kind-icon">group<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#increaseZoom" class="tsd-kind-icon">increase<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#isValidMember" class="tsd-kind-icon">is<wbr>Valid<wbr>Member</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#pasteFromClipboard" class="tsd-kind-icon">paste<wbr>From<wbr>Clipboard</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#pasteSelection" class="tsd-kind-icon">paste<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#redo" class="tsd-kind-icon">redo</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#resetZoom" class="tsd-kind-icon">reset<wbr>Zoom</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#scrollToPart" class="tsd-kind-icon">scroll<wbr>ToPart</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#selectAll" class="tsd-kind-icon">select<wbr>All</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#showContextMenu" class="tsd-kind-icon">show<wbr>Context<wbr>Menu</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#stopCommand" class="tsd-kind-icon">stop<wbr>Command</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#undo" class="tsd-kind-icon">undo</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#ungroupSelection" class="tsd-kind-icon">ungroup<wbr>Selection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="CommandHandler.html#zoomToFit" class="tsd-kind-icon">zoom<wbr>ToFit</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<div class="container-fluid bottom-copyright plr15">
Copyright &copy; 1998-2019 by Northwoods Software Corporation.
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script src="../../assets/js/api.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1506307-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>