create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
111 lines (109 loc) • 27 kB
HTML
<html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Transaction | 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/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
var hash = null;
function changeHash() {
var panels = document.getElementsByClassName("tsd-panel");
for (let i = 0; i < panels.length; i++) {
var p = panels[i];
p.classList.remove("targeted");
}
hash = window.location.hash.slice(1);
if (hash) {
var elt = document.getElementById(hash);
if (elt) elt.parentNode.classList.add("targeted");
}
}
document.addEventListener("DOMContentLoaded", changeHash);
window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
// topnav
var topButton = document.getElementById("topnavButton");
var topnavList = document.getElementById("topnavList");
if (topButton && topnavList) {
topButton.addEventListener("click", function (e) {
topnavList
.classList
.toggle("hidden");
e.stopPropagation();
});
document.addEventListener("click", function (e) {
// if the clicked element isn't the list, close the list
if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
topButton.click();
}
});
// set active <a> element
// done via active tag below, always API
}
});</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></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"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="Transaction.html">Transaction</a></li></ul><h1 class="flex items-center">Class Transaction</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A Transaction holds a list of <a href="ChangedEvent.html" class="tsd-kind-class">ChangedEvent</a>s collected during a transaction,
as the value of the read-only <a href="Transaction.html#changes" class="tsd-kind-accessor">changes</a> property.</p>
<p>Start a transaction by calling <a href="UndoManager.html#startTransaction" class="tsd-kind-method">UndoManager.startTransaction</a>
(or <a href="Model.html#startTransaction" class="tsd-kind-method">Model.startTransaction</a> or <a href="Diagram.html#startTransaction" class="tsd-kind-method">Diagram.startTransaction</a>, which call that method).
Be sure to finish a transaction with a matching call to <a href="UndoManager.html#commitTransaction" class="tsd-kind-method">UndoManager.commitTransaction</a>
(or <a href="Model.html#commitTransaction" class="tsd-kind-method">Model.commitTransaction</a> or <a href="Diagram.html#commitTransaction" class="tsd-kind-method">Diagram.commitTransaction</a>),
or a call to <a href="UndoManager.html#rollbackTransaction" class="tsd-kind-method">UndoManager.rollbackTransaction</a>
(or the same named methods on <a href="Model.html" class="tsd-kind-class">Model</a> or <a href="Diagram.html" class="tsd-kind-class">Diagram</a>).</p>
<p>If you are performing multiple or repeated changes to a model or diagram,
surround all of the code with calls to start and commit the transaction --
do not perform repeated calls to start-commit-start-commit.
Typically each change caused by the user, such as a button click or a change of focus or a mouse drag,
should perform one transaction in which all changes are made.
All of the predefined commands and tools perform transactions.</p>
<p>Undoing or redoing a transaction is done by calling <a href="UndoManager.html#undo" class="tsd-kind-method">UndoManager.undo</a> or <a href="UndoManager.html#redo" class="tsd-kind-method">UndoManager.redo</a>.
Those methods call the <a href="Transaction.html#undo" class="tsd-kind-method">undo</a> or <a href="Transaction.html#redo" class="tsd-kind-method">redo</a> methods here.</p>
<p>The <a href="UndoManager.html" class="tsd-kind-class">UndoManager</a> holds a list of Transactions in its <a href="UndoManager.html#history" class="tsd-kind-accessor">UndoManager.history</a>.</p>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="Transaction.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Transaction.html#changes" class="tsd-index-link"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF4D4D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>changes</span></a>
<a href="Transaction.html#isComplete" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Complete</span></a>
<a href="Transaction.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>name</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Transaction.html#canRedo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Redo</span></a>
<a href="Transaction.html#canUndo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Undo</span></a>
<a href="Transaction.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clear</span></a>
<a href="Transaction.html#optimize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>optimize</span></a>
<a href="Transaction.html#redo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>redo</span></a>
<a href="Transaction.html#undo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>undo</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Transaction" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Transaction</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Transaction.html" class="tsd-signature-type tsd-kind-class">Transaction</a><a href="#constructor.new_Transaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Construct an object holding an empty list of <a href="ChangedEvent.html" class="tsd-kind-class">ChangedEvent</a>s
and no <a href="Transaction.html#name" class="tsd-kind-accessor">name</a>.
It would be very unusual to call this -- normally transactions are constructed
automatically upon calls to <a href="Model.html#commit" class="tsd-kind-method">Model.commit</a>, <a href="Diagram.html#commit" class="tsd-kind-method">Diagram.commit</a>,
<a href="Model.html#startTransaction" class="tsd-kind-method">Model.startTransaction</a>, or <a href="Diagram.html#startTransaction" class="tsd-kind-method">Diagram.startTransaction</a>.</p>
</div><h4 class="tsd-returns-title">Returns <a href="Transaction.html" class="tsd-signature-type tsd-kind-class">Transaction</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="changes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadOnly">Readonly</code><span>changes</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="List.html" class="tsd-signature-type tsd-kind-class">List</a><span class="tsd-signature-symbol"><</span><a href="ChangedEvent.html" class="tsd-signature-type tsd-kind-class">ChangedEvent</a><span class="tsd-signature-symbol">></span></div><a href="#changes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This read-only property returns the list of <a href="ChangedEvent.html" class="tsd-kind-class">ChangedEvent</a>s.
The changes are stored in order of occurrence.</p>
<p>You should not modify this list.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="isComplete" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Complete</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></div><a href="#isComplete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets whether we can add more <a href="ChangedEvent.html" class="tsd-kind-class">ChangedEvent</a>s to this list of changes.
This is initially false.
It is set to true by <a href="UndoManager.html#commitTransaction" class="tsd-kind-method">UndoManager.commitTransaction</a> and <a href="UndoManager.html#rollbackTransaction" class="tsd-kind-method">UndoManager.rollbackTransaction</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>name</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the transaction name for this collection of changes.
This is set by a top-level call to <a href="UndoManager.html#commitTransaction" class="tsd-kind-method">UndoManager.commitTransaction</a>.</p>
</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="canRedo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>can<wbr/>Redo</span><a href="#canRedo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="canRedo.canRedo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Redo</span><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><a href="#canRedo.canRedo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This predicate returns true if you can call <a href="Transaction.html#redo" class="tsd-kind-method">redo</a>,
namely when <a href="Transaction.html#isComplete" class="tsd-kind-accessor">isComplete</a> is true.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if ready for <a href="Transaction.html#redo" class="tsd-kind-method">redo</a> to be called.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="canUndo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>can<wbr/>Undo</span><a href="#canUndo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="canUndo.canUndo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">can<wbr/>Undo</span><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><a href="#canUndo.canUndo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This predicate returns true if you can call <a href="Transaction.html#undo" class="tsd-kind-method">undo</a>,
namely when <a href="Transaction.html#isComplete" class="tsd-kind-accessor">isComplete</a> is true.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if ready for <a href="Transaction.html#undo" class="tsd-kind-method">undo</a> to be called.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="clear.clear-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clear</span><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><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clear all of the saved changes.</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"><a id="optimize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>optimize</span><a href="#optimize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="optimize.optimize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">optimize</span><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><a href="#optimize.optimize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Remove all but the first and last Property ChangedEvents for each property for each object.</p>
<p>This is now called by <a href="DraggingTool.html#stopTransaction" class="tsd-kind-method">DraggingTool.stopTransaction</a> in order to reduce the memory saved by each dragging transaction.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="redo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>redo</span><a href="#redo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="redo.redo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">redo</span><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><a href="#redo.redo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Re-perform these changes after an <a href="Transaction.html#undo" class="tsd-kind-method">undo</a>.
This is normally called only by the <a href="UndoManager.html" class="tsd-kind-class">UndoManager</a>.
<a href="Transaction.html#canRedo" class="tsd-kind-method">canRedo</a> must be true for this method to have any effect.</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"><a id="undo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>undo</span><a href="#undo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="undo.undo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">undo</span><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><a href="#undo.undo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Undo all of the changes, in reverse order.
This is normally called only by the <a href="UndoManager.html" class="tsd-kind-class">UndoManager</a>.
<a href="Transaction.html#canUndo" class="tsd-kind-method">canUndo</a> must be true for this method to have any effect.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#changes"><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF4D4D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>changes</span></a></li><li><a href="#isComplete"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>is<wbr/>Complete</span></a></li><li><a href="#name"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>name</span></a></li><li><a href="#canRedo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Redo</span></a></li><li><a href="#canUndo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Undo</span></a></li><li><a href="#clear"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clear</span></a></li><li><a href="#optimize"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>optimize</span></a></li><li><a href="#redo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>redo</span></a></li><li><a href="#undo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>undo</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': label,
'transport_type': 'beacon'
});
}
document.getElementById("contactBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>