gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
173 lines (172 loc) • 172 kB
HTML
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CommandHandler | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></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> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>® Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class CommandHandler </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><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" data-tsd-kind="Class">DrawCommandHandler</a></li><li><a href="LocalStorageCommandHandler.html" class="tsd-signature-type" data-tsd-kind="Class">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>
<div><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> & <code>Shift-Del</code> invoke <a href="CommandHandler.html#cutSelection">cutSelection</a></li>
<li><code>Ctrl-C</code> & <code>Ctrl-Insert</code> invoke <a href="CommandHandler.html#copySelection">copySelection</a></li>
<li><code>Ctrl-V</code> & <code>Shift-Insert</code> invoke <a href="CommandHandler.html#pasteSelection">pasteSelection</a></li>
<li><code>Del</code> & <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> & <code>Alt-Backspace</code> invoke <a href="CommandHandler.html#undo">undo</a></li>
<li><code>Ctrl-Y</code> & <code>Alt-Shift-Backspace</code> invoke <a href="CommandHandler.html#redo">redo</a></li>
<li><code>Up</code> & <code>Down</code> & <code>Left</code> & <code>Right</code> (arrow keys) call <a href="Diagram.html#scroll">Diagram.scroll</a></li>
<li><code>PageUp</code> & <code>PageDown</code> call <a href="Diagram.html#scroll">Diagram.scroll</a></li>
<li><code>Home</code> & <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-- & Keypad--</code> (minus) invoke <a href="CommandHandler.html#decreaseZoom">decreaseZoom</a></li>
<li><code>Ctrl-+ & 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></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#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#isZoomToFitRestoreEnabled" class="tsd-kind-icon">is<wbr/>Zoom<wbr/>To<wbr/>Fit<wbr/>Restore<wbr/>Enabled</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/>To<wbr/>Part</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/>To<wbr/>Fit</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/>To<wbr/>Clipboard</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/>To<wbr/>Part</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/>To<wbr/>Fit</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 id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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" data-tsd-kind="Class">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" data-tsd-kind="Class">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 id="archetypeGroupData" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> archetype<wbr/>Group<wbr/>Data<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><a href="#archetypeGroupData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></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>
<div><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></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="copiesConnectedLinks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copies<wbr/>Connected<wbr/>Links<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#copiesConnectedLinks" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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 id="copiesGroupKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copies<wbr/>Group<wbr/>Key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#copiesGroupKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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's key.</p>
<div><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'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>
</div><dl class="tsd-comment-tags"><dt class="">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 id="copiesParentKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copies<wbr/>Parent<wbr/>Key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#copiesParentKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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's key.</p>
<div><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'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>
</div><dl class="tsd-comment-tags"><dt class="">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 id="copiesTree" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> copies<wbr/>Tree<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#copiesTree" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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>
<div><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></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="deletesConnectedLinks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> deletes<wbr/>Connected<wbr/>Links<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#deletesConnectedLinks" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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 class="">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 id="deletesTree" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> deletes<wbr/>Tree<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#deletesTree" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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 id="diagram" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> diagram<span class="tsd-signature-symbol">: </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a><a href="#diagram" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></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 id="isZoomToFitRestoreEnabled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> is<wbr/>Zoom<wbr/>To<wbr/>Fit<wbr/>Restore<wbr/>Enabled<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isZoomToFitRestoreEnabled" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets whether the <a href="CommandHandler.html#zoomToFit">zoomToFit</a> command ever restores the previous
Diagram scale and position.
When this property is false, this command always calls <a href="Diagram.html#zoomToFit">Diagram.zoomToFit</a>.</p>
<div><p>The default value is true.
Setting this property does not raise any events.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>2.2</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="memberValidation" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> member<wbr/>Validation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>aGroup<span class="tsd-signature-symbol">: </span><a href="Group.html" class="tsd-signature-type" data-tsd-kind="Class">Group</a>, somePart<span class="tsd-signature-symbol">: </span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><a href="#memberValidation" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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'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>.<div><p>The function, if supplied, must not have any side-effects.</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="zoomFactor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> zoom<wbr/>Factor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#zoomFactor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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 id="addTopLevelParts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> add<wbr/>Top<wbr/>Level<wbr/>Parts<a href="#addTopLevelParts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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" data-tsd-kind="Interface">Iterable</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">></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>
<div><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></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>coll: <a href="Iterable.html" class="tsd-signature-type" data-tsd-kind="Interface">Iterable</a><span class="tsd-signature-symbol"><</span><a href="Part.html" class="tsd-signature-type" data-tsd-kind="Class">Part</a><span class="tsd-signature-symbol">></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><div><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>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="canCollapseSubGraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Collapse<wbr/>Sub<wbr/>Graph<a href="#canCollapseSubGraph" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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" data-tsd-kind="Class">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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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" data-tsd-kind="Class">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 id="canCollapseTree" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Collapse<wbr/>Tree<a href="#canCollapseTree" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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" data-tsd-kind="Class">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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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" data-tsd-kind="Class">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 id="canCopySelection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Copy<wbr/>Selection<a href="#canCopySelection" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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><div><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>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="canCutSelection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Cut<wbr/>Selection<a href="#canCutSelection" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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>
<div><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>
</div><dl class="tsd-comment-tags"><dt class="">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><div><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>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="canDecreaseZoom" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Decrease<wbr/>Zoom<a href="#canDecreaseZoom" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></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">)<