59 lines
30 KiB
HTML
59 lines
30 KiB
HTML
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Multiplicity | @maxgraph/core</title><meta name="description" content="Documentation for @maxgraph/core"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.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><div class="tsd-page-toolbar"><div class="container"><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">@maxgraph/core</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" checked/><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 class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@maxgraph/core</a></li><li><a href="Multiplicity.html">Multiplicity</a></li></ul><h1>Class Multiplicity</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Multiplicity</span></li></ul></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="Multiplicity.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-property tsd-parent-kind-class"><a href="Multiplicity.html#attr" class="tsd-kind-icon">attr</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#countError" class="tsd-kind-icon">count<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#min" class="tsd-kind-icon">min</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#source" class="tsd-kind-icon">source</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#typeError" class="tsd-kind-icon">type<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#validNeighbors" class="tsd-kind-icon">valid<wbr/>Neighbors</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#validNeighborsAllowed" class="tsd-kind-icon">valid<wbr/>Neighbors<wbr/>Allowed</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#value" class="tsd-kind-icon">value</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="Multiplicity.html#check" class="tsd-kind-icon">check</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkNeighbors" class="tsd-kind-icon">check<wbr/>Neighbors</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkTerminal" class="tsd-kind-icon">check<wbr/>Terminal</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkType" class="tsd-kind-icon">check<wbr/>Type</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>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Multiplicity<span class="tsd-signature-symbol">(</span>source<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attr<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, min<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span>, max<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"n"</span>, validNeighbors<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, countError<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, typeError<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, validNeighborsAllowed<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><a href="Multiplicity.html" class="tsd-signature-type" data-tsd-kind="Class">Multiplicity</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L33">view/other/Multiplicity.ts:33</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>source: <span class="tsd-signature-type">boolean</span></h5></li><li><h5>type: <span class="tsd-signature-type">string</span></h5></li><li><h5>attr: <span class="tsd-signature-type">string</span></h5></li><li><h5>value: <span class="tsd-signature-type">string</span></h5></li><li><h5>min: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h5></li><li><h5>max: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"n"</span></h5></li><li><h5>validNeighbors: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li><li><h5>countError: <span class="tsd-signature-type">string</span></h5></li><li><h5>typeError: <span class="tsd-signature-type">string</span></h5></li><li><h5>validNeighborsAllowed: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="Multiplicity.html" class="tsd-signature-type" data-tsd-kind="Class">Multiplicity</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-property tsd-parent-kind-class"><a id="attr" class="tsd-anchor"></a><h3>attr</h3><div class="tsd-signature tsd-kind-icon">attr<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L68">view/other/Multiplicity.ts:68</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Optional string that specifies the attributename to be passed to
|
|
{@link mxUtils.isNode} to check if the rule applies to a cell.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="countError" class="tsd-anchor"></a><h3>count<wbr/>Error</h3><div class="tsd-signature tsd-kind-icon">count<wbr/>Error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L114">view/other/Multiplicity.ts:114</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Holds the localized error message to be displayed if the number of
|
|
connections for which the rule applies is smaller than <a href="Multiplicity.html#min">min</a> or greater
|
|
than <a href="Multiplicity.html#max">max</a>.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="max" class="tsd-anchor"></a><h3>max</h3><div class="tsd-signature tsd-kind-icon">max<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"n"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L94">view/other/Multiplicity.ts:94</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Defines the maximum number of connections for which this rule applies.
|
|
A value of 'n' means unlimited times.</p>
|
|
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>'n'</p>
|
|
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="min" class="tsd-anchor"></a><h3>min</h3><div class="tsd-signature tsd-kind-icon">min<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L87">view/other/Multiplicity.ts:87</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Defines the minimum number of connections for which this rule applies.</p>
|
|
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>0</p>
|
|
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="source" class="tsd-anchor"></a><h3>source</h3><div class="tsd-signature tsd-kind-icon">source<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L80">view/other/Multiplicity.ts:80</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Boolean that specifies if the rule is applied to the source or target
|
|
terminal of an edge.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="type" class="tsd-anchor"></a><h3>type</h3><div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L62">view/other/Multiplicity.ts:62</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Defines the type of the source or target terminal. The type is a string
|
|
passed to {@link mxUtils.isNode} together with the source or target vertex
|
|
value as the first argument.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="typeError" class="tsd-anchor"></a><h3>type<wbr/>Error</h3><div class="tsd-signature tsd-kind-icon">type<wbr/>Error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L120">view/other/Multiplicity.ts:120</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Holds the localized error message to be displayed if the type of the
|
|
neighbor for a connection does not match the rule.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="validNeighbors" class="tsd-anchor"></a><h3>valid<wbr/>Neighbors</h3><div class="tsd-signature tsd-kind-icon">valid<wbr/>Neighbors<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L101">view/other/Multiplicity.ts:101</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Holds an array of strings that specify the type of neighbor for which
|
|
this rule applies. The strings are used in {@link Cell.is} on the opposite
|
|
terminal to check if the rule applies to the connection.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="validNeighborsAllowed" class="tsd-anchor"></a><h3>valid<wbr/>Neighbors<wbr/>Allowed</h3><div class="tsd-signature tsd-kind-icon">valid<wbr/>Neighbors<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L107">view/other/Multiplicity.ts:107</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Boolean indicating if the list of validNeighbors are those that are allowed
|
|
for this rule or those that are not allowed for this rule.</p>
|
|
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="value" class="tsd-anchor"></a><h3>value</h3><div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L74">view/other/Multiplicity.ts:74</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Optional string that specifies the value of the attribute to be passed
|
|
to {@link mxUtils.isNode} to check if the rule applies to a cell.</p>
|
|
</div></div></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="check" class="tsd-anchor"></a><h3>check</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">check<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, source<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, target<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, sourceOut<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, targetIn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L133">view/other/Multiplicity.ts:133</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Checks the multiplicity for the given arguments and returns the error
|
|
for the given connection or null if the multiplicity does not apply.</p>
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Reference to the enclosing {@link graph} instance.</p>
|
|
</div></div></li><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>{@link mxCell} that represents the edge to validate.</p>
|
|
</div></div></li><li><h5>source: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>{@link mxCell} that represents the source terminal.</p>
|
|
</div></div></li><li><h5>target: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>{@link mxCell} that represents the target terminal.</p>
|
|
</div></div></li><li><h5>sourceOut: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Number of outgoing edges from the source terminal.</p>
|
|
</div></div></li><li><h5>targetIn: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Number of incoming edges for the target terminal.</p>
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="checkNeighbors" class="tsd-anchor"></a><h3>check<wbr/>Neighbors</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">check<wbr/>Neighbors<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, source<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, target<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L175">view/other/Multiplicity.ts:175</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Checks if there are any valid neighbours in <a href="Multiplicity.html#validNeighbors">validNeighbors</a>. This is only
|
|
called if <a href="Multiplicity.html#validNeighbors">validNeighbors</a> is a non-empty array.</p>
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5></li><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>source: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>target: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></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="checkTerminal" class="tsd-anchor"></a><h3>check<wbr/>Terminal</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">check<wbr/>Terminal<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, edge<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, terminal<span class="tsd-signature-symbol">: </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</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"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L199">view/other/Multiplicity.ts:199</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Checks the given terminal cell and returns true if this rule applies. The
|
|
given cell is the source or target of the given edge, depending on
|
|
<a href="Multiplicity.html#source">source</a>. This implementation uses <a href="Multiplicity.html#checkType">checkType</a> on the terminal's value.</p>
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5></li><li><h5>edge: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>terminal: <a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></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="checkType" class="tsd-anchor"></a><h3>check<wbr/>Type</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">check<wbr/>Type<span class="tsd-signature-symbol">(</span>graph<span class="tsd-signature-symbol">: </span><a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Element</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a>, type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, attr<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, attrValue<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">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/maxgraph/maxgraph/blob/598b60e2f/packages/core/src/view/other/Multiplicity.ts#L208">view/other/Multiplicity.ts:208</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
<p>Checks the type of the given value.</p>
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>graph: <a href="Graph.html" class="tsd-signature-type" data-tsd-kind="Class">Graph</a></h5></li><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Element</span><span class="tsd-signature-symbol"> | </span><a href="Cell.html" class="tsd-signature-type" data-tsd-kind="Class">Cell</a></h5></li><li><h5>type: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> attr: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> attrValue: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/DomHelpers.html">Dom<wbr/>Helpers</a></li><li class=" tsd-kind-namespace"><a href="../modules/cloneUtils.html">clone<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/constants.html">constants</a></li><li class=" tsd-kind-namespace"><a href="../modules/domUtils.html">dom<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/eventUtils.html">event<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/gestureUtils.html">gesture<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/mathUtils.html">math<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/stringUtils.html">string<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/styleUtils.html">style<wbr/>Utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/utils.html">utils</a></li><li class=" tsd-kind-namespace"><a href="../modules/xmlUtils.html">xml<wbr/>Utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="Multiplicity.html" class="tsd-kind-icon">Multiplicity</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Multiplicity.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#attr" class="tsd-kind-icon">attr</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#countError" class="tsd-kind-icon">count<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#min" class="tsd-kind-icon">min</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#source" class="tsd-kind-icon">source</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#typeError" class="tsd-kind-icon">type<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#validNeighbors" class="tsd-kind-icon">valid<wbr/>Neighbors</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#validNeighborsAllowed" class="tsd-kind-icon">valid<wbr/>Neighbors<wbr/>Allowed</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="Multiplicity.html#value" class="tsd-kind-icon">value</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#check" class="tsd-kind-icon">check</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkNeighbors" class="tsd-kind-icon">check<wbr/>Neighbors</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkTerminal" class="tsd-kind-icon">check<wbr/>Terminal</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Multiplicity.html#checkType" class="tsd-kind-icon">check<wbr/>Type</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> |