create-gojs-kit
Version:
A CLI for downloading GoJS samples, extensions, and docs
93 lines (91 loc) • 22.2 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>Theme | 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="Theme.html">Theme</a></li></ul><h1 class="flex items-center">Interface Theme</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 interface describing a theme.</p>
<p>The various optional properties this interface provides are the default
object names used to lookup some binding target properties. For example,
<a href="Panel.html#padding" class="tsd-kind-accessor">Panel.padding</a> is looked up in the <a href="Theme.html#margins" class="tsd-kind-property">margins</a> object and
<a href="Shape.html#strokeWidth" class="tsd-kind-accessor">Shape.strokeWidth</a> and <a href="GraphObject.html#opacity" class="tsd-kind-accessor">GraphObject.opacity</a> are looked up in the <a href="Theme.html#numbers" class="tsd-kind-property">numbers</a> object.</p>
<p>While the indexer can be used for other arbitrary objects, we suggest using the optional named properties
here for their respective purposes.</p>
</div><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></section><section class="tsd-panel"><h4 class="tsd-before-signature">Indexable</h4><div class="tsd-signature"><span class="tsd-signature-symbol">[</span>index: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div><div class="tsd-comment tsd-typography"><p>The string index, allowing for any other <a href="ThemeValues.html" class="tsd-kind-interface">ThemeValues</a> object</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">Properties</h3><div class="tsd-index-list"><a href="Theme.html#arrowheads" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>arrowheads?</span></a>
<a href="Theme.html#colors" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>colors?</span></a>
<a href="Theme.html#fonts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fonts?</span></a>
<a href="Theme.html#margins" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>margins?</span></a>
<a href="Theme.html#numbers" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>numbers?</span></a>
<a href="Theme.html#points" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>points?</span></a>
<a href="Theme.html#rects" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rects?</span></a>
<a href="Theme.html#sizes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>sizes?</span></a>
<a href="Theme.html#spots" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>spots?</span></a>
<a href="Theme.html#targetPropertyMap" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>target<wbr/>Property<wbr/>Map?</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="arrowheads" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>arrowheads</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><a href="#arrowheads" 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 tsd-typography"><p>The arrowheads used for Link shapes.
Values should correspond with valid arrowhead names for <a href="Shape.html#fromArrow" class="tsd-kind-accessor">Shape.fromArrow</a> and <a href="Shape.html#toArrow" class="tsd-kind-accessor">Shape.toArrow</a>.</p>
<p>Built-in themes provide a <code>toArrow</code> value for the default link template.</p>
</div></section><section class="tsd-panel tsd-member"><a id="colors" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>colors</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeColors.html" class="tsd-signature-type tsd-kind-interface">ThemeColors</a></div><a href="#colors" 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 tsd-typography"><p>The colors used by the theme.
See <a href="ThemeColors.html" class="tsd-kind-interface">ThemeColors</a>.</p>
</div></section><section class="tsd-panel tsd-member"><a id="fonts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>fonts</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><a href="#fonts" 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 tsd-typography"><p>The fonts used by the theme.</p>
<p>Built-in themes provide values for <code>normal</code> and <code>bold</code> fonts.</p>
</div></section><section class="tsd-panel tsd-member"><a id="margins" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>margins</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><a href="Margin.html" class="tsd-signature-type tsd-kind-class">Margin</a><span class="tsd-signature-symbol">></span></div><a href="#margins" 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 tsd-typography"><p>The <a href="Margin.html" class="tsd-kind-class">Margin</a>s used by the theme.</p>
<p>Built-in themes provide a <code>group</code> value for the default Group template's <a href="Placeholder.html#padding" class="tsd-kind-accessor">Placeholder.padding</a>.</p>
</div></section><section class="tsd-panel tsd-member"><a id="numbers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>numbers</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></div><a href="#numbers" 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 tsd-typography"><p>The numbers used by the theme, most commonly specifying stroke widths.</p>
<p>Built-in themes provide values for <code>group</code> and <code>selection</code> stroke widths.</p>
</div></section><section class="tsd-panel tsd-member"><a id="points" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>points</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">></span></div><a href="#points" 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 tsd-typography"><p>The <a href="Point.html" class="tsd-kind-class">Point</a>s used by the theme.</p>
</div></section><section class="tsd-panel tsd-member"><a id="rects" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>rects</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a><span class="tsd-signature-symbol">></span></div><a href="#rects" 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 tsd-typography"><p>The <a href="Rect.html" class="tsd-kind-class">Rect</a>s used by the theme.</p>
</div></section><section class="tsd-panel tsd-member"><a id="sizes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>sizes</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><a href="Size.html" class="tsd-signature-type tsd-kind-class">Size</a><span class="tsd-signature-symbol">></span></div><a href="#sizes" 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 tsd-typography"><p>The <a href="Size.html" class="tsd-kind-class">Size</a>s used by the theme.</p>
</div></section><section class="tsd-panel tsd-member"><a id="spots" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>spots</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="ThemeValues.html" class="tsd-signature-type tsd-kind-interface">ThemeValues</a><span class="tsd-signature-symbol"><</span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a><span class="tsd-signature-symbol">></span></div><a href="#spots" 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 tsd-typography"><p>The <a href="Spot.html" class="tsd-kind-class">Spot</a>s used by the theme.</p>
</div></section><section class="tsd-panel tsd-member"><a id="targetPropertyMap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>target<wbr/>Property<wbr/>Map</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><a href="#targetPropertyMap" 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 tsd-typography"><p>A map of GraphObject target properties to Theme objects.
This determines where a lookup will occur for a given property.
For example, one might map <a href="Shape.html#fill" class="tsd-kind-accessor">Shape.fill</a> to the <a href="Theme.html#colors" class="tsd-kind-property">colors</a> object via "fill" -> "colors".</p>
<p>If not defined, or a target property is missing, some sensible defaults are provided.</p>
</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="#arrowheads"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>arrowheads</span></a></li><li><a href="#colors"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>colors</span></a></li><li><a href="#fonts"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>fonts</span></a></li><li><a href="#margins"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>margins</span></a></li><li><a href="#numbers"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>numbers</span></a></li><li><a href="#points"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>points</span></a></li><li><a href="#rects"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rects</span></a></li><li><a href="#sizes"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>sizes</span></a></li><li><a href="#spots"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>spots</span></a></li><li><a href="#targetPropertyMap"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>target<wbr/>Property<wbr/>Map</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>