create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
156 lines (154 loc) • 38.7 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>AnimationTrigger | 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="AnimationTrigger.html">AnimationTrigger</a></li></ul><h1 class="flex items-center">Class AnimationTrigger</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>An AnimationTrigger describes how to automatically animate a property on a <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a>
when it changes value.
The target property name is a string, and all name matching is case-sensitive.</p>
<p>Triggers will be shared by all copies of the template's GraphObjects.
You can include AnimationTriggers in your templates just like <a href="Binding.html" class="tsd-kind-class">Binding</a>s are included:</p>
<pre><code class="language-js"><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Panel</span><span class="hl-2">(</span><span class="hl-6">"Vertical"</span><span class="hl-2">,</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-0">// ... Panel properties</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> </span><span class="hl-0">// This trigger uses the default value of AnimationTrigger.startCondition:</span><br/><span class="hl-2"> </span><span class="hl-0">// If a transaction is ongoing and Panel.position is changed, this trigger will animate</span><br/><span class="hl-2"> </span><span class="hl-0">// all changes to Panel.position at the end of the next transaction, in one bundled Animation.</span><br/><span class="hl-2"> </span><span class="hl-0">// If no transaction is ongoing, then it will animate this value immediately.</span><br/><span class="hl-2"> .</span><span class="hl-5">trigger</span><span class="hl-2">(</span><span class="hl-6">"position"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-5">add</span><span class="hl-2">(</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Shape</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-0">// ... Shape properties</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> </span><span class="hl-0">// Animate all changes to Shape.opacity immediately</span><br/><span class="hl-2"> .</span><span class="hl-5">trigger</span><span class="hl-2">(</span><span class="hl-6">"opacity"</span><span class="hl-2">, </span><span class="hl-1">null</span><span class="hl-2">, </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TriggerStart</span><span class="hl-2">.</span><span class="hl-4">Immediate</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-0">// ... other GraphObjects in the Panel</span><br/><span class="hl-2"> )</span>
</code><button>Copy</button></pre>
<p>When the <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> is <a href="TriggerStart.html#Default" class="tsd-kind-enum-member">TriggerStart.Default</a>,
GoJS will attempt to <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a> or <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a> based on the state of the transaction.
If no transaction is ongoing, this trigger will treat the default as using <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a>.
Otherwise it will work as <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a>.</p>
<p>When the <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> is <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a>,
the AnimationManager will use the default animation to prepare a single Animation that begins when the current transaction has ended.
This animation may be canceled if a new transaction is started.</p>
<p>When the <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> is <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a>,
a new animation will be created for every instance of the property changed, and started immediately,
and run until completion. This may be useful for cosmetic changes, such as animating
the opacity or color of an object on mouseEnter or mouseLeave.</p>
<p>You can only specify properties that exist on the GraphObject, and are also registered with <a href="AnimationManager.html#defineAnimationEffect" class="tsd-kind-method">AnimationManager.defineAnimationEffect</a>.
By default these properties are:</p>
<ul>
<li><code>"position"</code></li>
<li><code>"location"</code> (on Parts)</li>
<li><code>"scale"</code></li>
<li><code>"opacity"</code></li>
<li><code>"angle"</code></li>
<li><code>"desiredSize"</code></li>
<li><code>"background"</code></li>
<li><code>"fill"</code> (on Shapes)</li>
<li><code>"strokeWidth"</code> (on Shapes)</li>
<li><code>"strokeDashOffset"</code> (on Shapes)</li>
<li><code>"stroke"</code> (on Shapes, TextBlocks)</li>
</ul>
<p>Examples of defining additional animation properties are given in the <a href="../../intro/animation.html">Introduction Page on Animations</a>.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.1</p>
</div></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="AnimationTrigger.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="AnimationTrigger.html#animationSettings" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>animation<wbr/>Settings</span></a>
<a href="AnimationTrigger.html#propertyName" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>property<wbr/>Name</span></a>
<a href="AnimationTrigger.html#startCondition" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Condition</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="AnimationTrigger.html#copy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="AnimationTrigger.html#Bundled" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><g id="subicon-S,#FF984D"><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="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF984D"><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-1024"></use></svg><span>Bundled</span></a>
<a href="AnimationTrigger.html#Default" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Default</span></a>
<a href="AnimationTrigger.html#Immediate" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Immediate</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_AnimationTrigger" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Animation<wbr/>Trigger</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">animationSettings</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">duration</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">easing</span><span class="tsd-signature-symbol">?: </span><a href="EasingFunction.html" class="tsd-signature-type tsd-kind-type-alias">EasingFunction</a><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">finished</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">animation</span><span class="tsd-signature-symbol">: </span><a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span>, <span class="tsd-kind-parameter">startCondition</span><span class="tsd-signature-symbol">?: </span><a href="TriggerStart.html" class="tsd-signature-type tsd-kind-enum">TriggerStart</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AnimationTrigger.html" class="tsd-signature-type tsd-kind-class">AnimationTrigger</a><a href="#constructor.new_AnimationTrigger" 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 constructor creates an AnimationTrigger. These are typically constructed within Part templates.</p>
<pre><code class="language-js"><span class="hl-2"> </span><span class="hl-0">// ...</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Shape</span><span class="hl-2">(</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-0">// ... Shape properties</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> </span><span class="hl-0">// Animate all changes to Shape.opacity immediately</span><br/><span class="hl-2"> .</span><span class="hl-5">trigger</span><span class="hl-2">(</span><span class="hl-6">"opacity"</span><span class="hl-2">, </span><span class="hl-1">null</span><span class="hl-2">, </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">TriggerStart</span><span class="hl-2">.</span><span class="hl-4">Immediate</span><span class="hl-2">)</span>
</code><button>Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A string naming the target property to animate.
This should not be the empty string.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">animationSettings</span>: <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">duration</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">easing</span><span class="tsd-signature-symbol">?: </span><a href="EasingFunction.html" class="tsd-signature-type tsd-kind-type-alias">EasingFunction</a><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">finished</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">animation</span><span class="tsd-signature-symbol">: </span><a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5><div class="tsd-comment tsd-typography"><p>An optional Object describing properties to set on animations created by this AnimationTrigger.
See the animationSettings property for detail.
If specified, this also sets the startCondition to <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a>.</p>
</div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">duration</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">easing</span><span class="tsd-signature-symbol">?: </span><a href="EasingFunction.html" class="tsd-signature-type tsd-kind-type-alias">EasingFunction</a></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">finished</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">animation</span><span class="tsd-signature-symbol">: </span><a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">animation</span><span class="tsd-signature-symbol">: </span><a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">animation</span>: <a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">startCondition</span>: <a href="TriggerStart.html" class="tsd-signature-type tsd-kind-enum">TriggerStart</a></h5><div class="tsd-comment tsd-typography"><p>An optional TriggerStart to set the startCondition property.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AnimationTrigger.html" class="tsd-signature-type tsd-kind-class">AnimationTrigger</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="animationSettings" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>animation<wbr/>Settings</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">duration</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">easing</span><span class="tsd-signature-symbol">?: </span><a href="EasingFunction.html" class="tsd-signature-type tsd-kind-type-alias">EasingFunction</a><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">finished</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">animation</span><span class="tsd-signature-symbol">: </span><a href="Animation.html" class="tsd-signature-type tsd-kind-class">Animation</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><a href="#animationSettings" 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>These settings are only used if the <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> is <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a>.
Creating a new AnimationTrigger with animationSettings in the constructor automatically sets <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> to <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a></p>
<p>This gets or sets the settings for any <a href="Animation.html" class="tsd-kind-class">Animation</a>s this trigger creates.
Immediate triggers create a new Animation with each triggering, and apply these settings to that Animation.</p>
<p>This can be set to an object with a subset of possible <a href="Animation.html" class="tsd-kind-class">Animation</a> settings. The default value is <code>null</code>, which keeps default Animation settings.</p>
<p>Since a <a href="AnimationTrigger.html#startCondition" class="tsd-kind-accessor">startCondition</a> of <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a> uses the default animation,
you must set the properties of <a href="AnimationManager.html#defaultAnimation" class="tsd-kind-accessor">AnimationManager.defaultAnimation</a>, and not this property, to modify the animation settings.</p>
<p>To set default settings for <em>all</em> created Animations, you can modify the settings on <a href="AnimationManager.html" class="tsd-kind-class">AnimationManager</a> instead, such as <a href="AnimationManager.html#duration" class="tsd-kind-accessor">AnimationManager.duration</a>.</p>
<p>Possible properties to set in this object are:</p>
<ul>
<li><strong>duration</strong>: a <code>number</code>, corresponding to <a href="Animation.html#duration" class="tsd-kind-accessor">Animation.duration</a>.</li>
<li><strong>finished</strong>: a <code>Function</code>, corresponding to <a href="Animation.html#finished" class="tsd-kind-accessor">Animation.finished</a>.</li>
<li><strong>easing</strong>: an <code>EasingFunction</code>, corresponding to <a href="Animation.html#easing" class="tsd-kind-accessor">Animation.easing</a>.</li>
</ul>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="propertyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>property<wbr/>Name</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#propertyName" 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 name of the property to animate on the target <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a>.
The default value is set during constructor initialization.</p>
<p>You can only specify properties that exist on the GraphObject, and are also registered with <a href="AnimationManager.html#defineAnimationEffect" class="tsd-kind-method">AnimationManager.defineAnimationEffect</a>.
By default these properties are the same as the list of possible Animation effects:</p>
<ul>
<li><code>"position"</code></li>
<li><code>"location"</code> (on Parts)</li>
<li><code>"scale"</code></li>
<li><code>"opacity"</code></li>
<li><code>"angle"</code></li>
<li><code>"desiredSize"</code></li>
<li><code>"background"</code></li>
<li><code>"fill"</code> (on Shapes)</li>
<li><code>"strokeWidth"</code> (on Shapes)</li>
<li><code>"strokeDashOffset"</code> (on Shapes)</li>
<li><code>"stroke"</code> (on Shapes, TextBlocks)</li>
</ul>
<p>Examples of defining additional properties by adding animation effects are given in the <a href="../../intro/animation.html">Introduction Page on Animations</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="startCondition" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start<wbr/>Condition</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="TriggerStart.html" class="tsd-signature-type tsd-kind-enum">TriggerStart</a></div><a href="#startCondition" 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 starting condition for this trigger.</p>
<p>AnimationTriggers can invoke an animation immediately,
starting a new animation with each property of each GraphObject that has been modified,
or they can (more efficiently) be bundled together into the default animation (<a href="AnimationManager.html#defaultAnimation" class="tsd-kind-accessor">AnimationManager.defaultAnimation</a>)
and begin only one animation, at the end of the next transaction.</p>
<p>It is useful for the startCondition to be <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a> when changing GraphObject properties
on <a href="GraphObject.html#mouseEnter" class="tsd-kind-accessor">GraphObject.mouseEnter</a> or <a href="GraphObject.html#mouseLeave" class="tsd-kind-accessor">GraphObject.mouseLeave</a>.
It is useful for the startCondition to be <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a> when changing several GraphObject properties together,
such as when highlighting multiple parts, on selection changes, and during transactions, or when performance is a consideration.</p>
<p>These behaviors can be set with the values <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a> and <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a>, respectively.
The default value, <a href="TriggerStart.html#Default" class="tsd-kind-enum-member">TriggerStart.Default</a>, attempts to infer which is best:
It will start immediately if there is no ongoing transaction
or if <a href="Diagram.html#skipsUndoManager" class="tsd-kind-accessor">Diagram.skipsUndoManager</a> is true, and otherwise bundle them.</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="copy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>copy</span><a href="#copy" 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="copy.copy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AnimationTrigger.html" class="tsd-signature-type tsd-kind-class">AnimationTrigger</a><a href="#copy.copy-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>Create a copy of this AnimationTrigger, with the same property values.</p>
</div><h4 class="tsd-returns-title">Returns <a href="AnimationTrigger.html" class="tsd-signature-type tsd-kind-class">AnimationTrigger</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="Bundled" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Bundled</span><a href="#Bundled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="TriggerStart.html#Bundled" class="tsd-kind-enum-member">TriggerStart.Bundled</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Default" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Default</span><a href="#Default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="TriggerStart.html#Default" class="tsd-kind-enum-member">TriggerStart.Default</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Immediate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Immediate</span><a href="#Immediate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="TriggerStart.html#Immediate" class="tsd-kind-enum-member">TriggerStart.Immediate</a>.</p>
</div></div></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="#animationSettings"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>animation<wbr/>Settings</span></a></li><li><a href="#propertyName"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>property<wbr/>Name</span></a></li><li><a href="#startCondition"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Condition</span></a></li><li><a href="#copy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a></li><li><a href="#Bundled" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Bundled</span></a></li><li><a href="#Default" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Default</span></a></li><li><a href="#Immediate" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Immediate</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>