UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

892 lines 63.7 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Spot | GoJS API</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../../assets/css/bootstrap.min.css"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <!-- non-fixed navbar --> <nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top"> <div class="container-fluid"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#navbar"> <a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> </div> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li><a href="../../index.html">Home</a></li> <li><a href="../../learn/index.html">Learn</a></li> <li><a href="../../samples/index.html">Samples</a></li> <li><a href="../../intro/index.html">Intro</a></li> <li><a href="../../api/index.html" target="api">API</a></li> <li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li> <li><a href="../../download.html">Download</a></li> <li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li> <li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li> <li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li> <li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li> </ul> </div><!--/.nav-collapse --> </div> </nav> <div class="tsd-page-header"> <div class="tsd-page-toolbar"> <div class="container-fluid plr15"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">GoJS API</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> </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-fluid plr15"> <div class="top-copyright"> <!--<b>GoJS</b>&reg; Diagramming Components<br/>version &lt;br/&gt;version 2.1.18 for TypeScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>--> <b>GoJS</b>&reg; Diagramming Components<br/>version 2.1.18<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a> </div> <div> <h1>Class Spot</h1> </div> </div> </div> </div> </header> <div class="container-fluid container-main plr15"> <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">Spot</span> </li> </ul> </section> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <p>A Spot represents a relative point from (0,0) to (1,1) within the bounds of a rectangular area plus an absolute offset.</p> <p>Use the static functions <a href="Spot.html#static-parse">Spot.parse</a> and <a href="Spot.html#static-stringify">Spot.stringify</a> to convert to and from a standard string representation that is independent of the current locale.</p> <p>When an instance of this class is the value of a property of a <a href="GraphObject.html">GraphObject</a> class or <a href="Diagram.html">Diagram</a> or <a href="CommandHandler.html">CommandHandler</a> or a <a href="Tool.html">Tool</a> class, you should treat the object as if it were frozen or read-only -- you cannot modify its properties. This allows the property to return a value without allocating a new instance. If you need to do your own calculations with the value, call <a href="Spot.html#copy">copy</a> to make a new instance with the same values that you can modify.</p> <p>Many methods modify the object&#39;s properties and then return a reference to &quot;this&quot; object. The only instance method to allocate a new object is the <a href="Spot.html#copy">copy</a> method. The static <a href="Spot.html#static-parse">Spot.parse</a> method also allocates a new object.</p> <p>The &quot;Debug&quot; implementation of this class is significantly slower than the &quot;Release&quot; implementation, mostly due to additional error checking.</p> <p>You cannot inherit from this class.</p> </div> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Spot.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Spot.html#offsetX" class="tsd-kind-icon">offsetX</a></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Spot.html#offsetY" class="tsd-kind-icon">offsetY</a></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Spot.html#x" class="tsd-kind-icon">x</a></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Spot.html#y" class="tsd-kind-icon">y</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="Spot.html#copy" class="tsd-kind-icon">copy</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#equals" class="tsd-kind-icon">equals</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#includesSide" class="tsd-kind-icon">includes<wbr>Side</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#isDefault" class="tsd-kind-icon">is<wbr>Default</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#isNoSpot" class="tsd-kind-icon">is<wbr>NoSpot</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#isNone" class="tsd-kind-icon">is<wbr>None</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#isSide" class="tsd-kind-icon">is<wbr>Side</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#isSpot" class="tsd-kind-icon">is<wbr>Spot</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#opposite" class="tsd-kind-icon">opposite</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-parse" class="tsd-kind-icon">parse</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#set" class="tsd-kind-icon">set</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="Spot.html#setTo" class="tsd-kind-icon">set<wbr>To</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-stringify" class="tsd-kind-icon">stringify</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Constants</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-AllSides" class="tsd-kind-icon">All<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Bottom" class="tsd-kind-icon">Bottom</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomCenter" class="tsd-kind-icon">Bottom<wbr>Center</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomLeft" class="tsd-kind-icon">Bottom<wbr>Left</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomLeftSides" class="tsd-kind-icon">Bottom<wbr>Left<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomRight" class="tsd-kind-icon">Bottom<wbr>Right</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomRightSides" class="tsd-kind-icon">Bottom<wbr>Right<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-BottomSide" class="tsd-kind-icon">Bottom<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Center" class="tsd-kind-icon">Center</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Default" class="tsd-kind-icon">Default</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Left" class="tsd-kind-icon">Left</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-LeftCenter" class="tsd-kind-icon">Left<wbr>Center</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-LeftRightSides" class="tsd-kind-icon">Left<wbr>Right<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-LeftSide" class="tsd-kind-icon">Left<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-MiddleBottom" class="tsd-kind-icon">Middle<wbr>Bottom</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-MiddleLeft" class="tsd-kind-icon">Middle<wbr>Left</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-MiddleRight" class="tsd-kind-icon">Middle<wbr>Right</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-MiddleTop" class="tsd-kind-icon">Middle<wbr>Top</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-None" class="tsd-kind-icon">None</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-NotBottomSide" class="tsd-kind-icon">Not<wbr>Bottom<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-NotLeftSide" class="tsd-kind-icon">Not<wbr>Left<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-NotRightSide" class="tsd-kind-icon">Not<wbr>Right<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-NotTopSide" class="tsd-kind-icon">Not<wbr>Top<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Right" class="tsd-kind-icon">Right</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-RightCenter" class="tsd-kind-icon">Right<wbr>Center</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-RightSide" class="tsd-kind-icon">Right<wbr>Side</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-Top" class="tsd-kind-icon">Top</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopBottomSides" class="tsd-kind-icon">Top<wbr>Bottom<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopCenter" class="tsd-kind-icon">Top<wbr>Center</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopLeft" class="tsd-kind-icon">Top<wbr>Left</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopLeftSides" class="tsd-kind-icon">Top<wbr>Left<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopRight" class="tsd-kind-icon">Top<wbr>Right</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopRightSides" class="tsd-kind-icon">Top<wbr>Right<wbr>Sides</a></li> <li class="tsd-kind-constant tsd-parent-kind-class tsd-is-static"><a href="Spot.html#static-TopSide" class="tsd-kind-icon">Top<wbr>Side</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 name="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>Spot<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, offx<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, offy<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><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>The default constructor produces the Spot(0, 0, 0, 0), at the top-left corner.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> x: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The x value of the Spot. Default is zero.</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> y: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The y value of the Spot. Default is zero.</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> offx: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>(Optional) The absolute x offset. Default is zero.</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> offy: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>(Optional) The absolute y offset. Default is zero.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"> <a name="offsetX" class="tsd-anchor"></a> <h3> offsetX <span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Gets or sets the offsetX value of the Spot. The value may be negative. If this represents a side value instead of a specific spot, this value is meaningless.</p> <p>A Spot(0,0,5,5) of a large rectangle is near the top-left corner, inside the rectangle. A Spot(1,1,5,5) would be near the bottom-right corner, outside the rectangle. A Spot(1,1,-5,-5) would also be near the bottom-right corner, but inside the rectangle.</p> </div> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"> <a name="offsetY" class="tsd-anchor"></a> <h3> offsetY <span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Gets or sets the offsetY value of the Spot. The value may be negative. If this represents a side value instead of a specific spot, this value is meaningless.</p> <p>A Spot(0,0,5,5) of a large rectangle is near the top-left corner, inside the rectangle. A Spot(1,1,5,5) would be near the bottom-right corner, outside the rectangle. A Spot(1,1,-5,-5) would also be near the bottom-right corner, but inside the rectangle.</p> </div> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"> <a name="x" class="tsd-anchor"></a> <h3> x <span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Gets or sets the x value of the Spot, a fractional value between zero and one.</p> <p>The Spot(0,0) of a rectangle is at the top-left corner. This value is commonly available as <a href="Spot.html#static-TopLeft">Spot.TopLeft</a>. The Spot(0.5,1) would be at the middle of the bottom side. That value is commonly available as <a href="Spot.html#static-MiddleBottom">Spot.MiddleBottom</a>.</p> </div> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"> <a name="y" class="tsd-anchor"></a> <h3> y <span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span> </h3> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Gets or sets the y value of the Spot, a fractional value between zero and one.</p> <p>The Spot(0,1) of a rectangle is at the bottom-left corner. This value is commonly available as <a href="Spot.html#static-BottomLeft">Spot.BottomLeft</a>. The Spot(1,0.5) would be at the middle of the right side. That value is commonly available as <a href="Spot.html#static-MiddleRight">Spot.MiddleRight</a>.</p> </div> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="copy" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagVirtual">Virtual</span> copy </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">copy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Create a copy of this Spot, with the same values.</p> </div> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="equals" class="tsd-anchor"></a> <h3> equals </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>spot<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Two spots are equal if all four property values are the same.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>spot: <a href="Spot.html" class="tsd-signature-type">Spot</a></h5> <div class="tsd-comment tsd-typography"> <p>The Spot to compare to the current Spot.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>True if the two spots are equal, false otherwise.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="includesSide" class="tsd-anchor"></a> <h3> includes<wbr>Side </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">includes<wbr>Side<span class="tsd-signature-symbol">(</span>side<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>This predicate is true if this Spot is a side that includes the side(s) given by the argument Spot.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>side: <a href="Spot.html" class="tsd-signature-type">Spot</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>false if either this Spot or the argument Spot is not a &quot;Side&quot;; true if the side(s) that this Spot represents are a superset or the same set of sides represented by the argument Spot.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="isDefault" class="tsd-anchor"></a> <h3> is<wbr>Default </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Default<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>True if this is a special spot indicating that the real spot value will come from another source.</p> </div> <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 name="isNoSpot" class="tsd-anchor"></a> <h3> is<wbr>NoSpot </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>NoSpot<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>True if this is an unspecific special spot, such as <a href="Spot.html#static-None">Spot.None</a> or one of the sides.</p> </div> <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 name="isNone" class="tsd-anchor"></a> <h3> is<wbr>None </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>None<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>True if this is a special spot referring to no particular spot or side.</p> </div> <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 name="isSide" class="tsd-anchor"></a> <h3> is<wbr>Side </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Side<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>True if this is a special spot referring to one (or more) of the sides. This is false if the spot is <a href="Spot.html#static-None">Spot.None</a>.</p> </div> <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 name="isSpot" class="tsd-anchor"></a> <h3> is<wbr>Spot </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Spot<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>True if this is a specific spot, not a side nor <a href="Spot.html#static-None">Spot.None</a>.</p> </div> <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 name="opposite" class="tsd-anchor"></a> <h3> opposite </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">opposite<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Return a new spot that is opposite this spot. The X and Y values will be an equal distance away from the center on the other side of the center. The OffsetX and OffsetY values are also negated.</p> <p>The result is meaningless if <a href="Spot.html#isNoSpot">isNoSpot</a> is true.</p> </div> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="static-parse" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> parse </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">parse<span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>This static function can be used to read in a <a href="Spot.html">Spot</a> from a string that was produced by <a href="Spot.html#static-stringify">Spot.stringify</a>.</p> <p><code>go.Spot.parse(&quot;0 1 2 3&quot;)</code> produces the Spot <code>new go.Spot(0, 1, 2, 3)</code>.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>str: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="set" class="tsd-anchor"></a> <h3> set </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>s<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Modify this Spot so that its X, Y, OffsetX, and OffsetY values are the same as the given Spot.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>s: <a href="Spot.html" class="tsd-signature-type">Spot</a></h5> <div class="tsd-comment tsd-typography"> <p>the given Spot.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> <p>this.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="setTo" class="tsd-anchor"></a> <h3> set<wbr>To </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">set<wbr>To<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offy<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><a href="Spot.html" class="tsd-signature-type">Spot</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>Modify this Spot with new X, Y, OffsetX, and OffsetY values.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>x: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>y: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>offx: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>offy: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="Spot.html" class="tsd-signature-type">Spot</a></h4> <p>this.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="static-stringify" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> stringify </h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">stringify<span class="tsd-signature-symbol">(</span>val<span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <div class="tsd-comment tsd-typography"> <p>This static function can be used to write out a <a href="Spot.html">Spot</a> as a string that can be read by <a href="Spot.html#static-parse">Spot.parse</a>.</p> <p><code>go.Spot.stringify(new go.Spot(0, 1, 2, 3))</code> produces the string &quot;0 1 2 3&quot;.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>val: <a href="Spot.html" class="tsd-signature-type">Spot</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Constants</h2> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-AllSides" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> All<wbr>Sides <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points on all sides of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Bottom" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-BottomCenter">Spot.BottomCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomCenter" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Center <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the middle of the bottom side of bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomLeft" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Left <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the bottom-left corner of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomLeftSides" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Left<wbr>Sides <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the left or bottom sides of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomRight" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Right <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the bottom-right corner of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomRightSides" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Right<wbr>Sides <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the right or bottom sides of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-BottomSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Bottom<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the bottom side of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Center" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Center <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the very center of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Default" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Default <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>Use this value to indicate that the real spot value is inherited from elsewhere.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Left" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Left <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-LeftCenter">Spot.LeftCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-LeftCenter" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Left<wbr>Center <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the middle of the left side of bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-LeftRightSides" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Left<wbr>Right<wbr>Sides <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the left or right sides of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-LeftSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Left<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the left side of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-MiddleBottom" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Middle<wbr>Bottom <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-BottomCenter">Spot.BottomCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-MiddleLeft" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Middle<wbr>Left <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-LeftCenter">Spot.LeftCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-MiddleRight" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Middle<wbr>Right <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-RightCenter">Spot.RightCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-MiddleTop" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Middle<wbr>Top <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-TopCenter">Spot.TopCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-None" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> None <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>Use this Spot value to indicate no particular spot -- code looking for a particular point on an element will need to do their own calculations to determine the desired point depending on the circumstances.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-NotBottomSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Not<wbr>Bottom<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points on all sides of bounding rectangle except bottom side.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-NotLeftSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Not<wbr>Left<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points on all sides of the bounding rectangle except left side.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-NotRightSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Not<wbr>Right<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points on all sides of the bounding rectangle except right side.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-NotTopSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Not<wbr>Top<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points on all sides of the bounding rectangle except top side.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Right" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Right <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-RightCenter">Spot.RightCenter</a>.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-RightCenter" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Right<wbr>Center <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The specific point at the middle of the right side of bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-RightSide" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Right<wbr>Side <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>The set of points at the right side of the bounding rectangle.</p> </div> </section> <section class="tsd-panel tsd-member tsd-kind-constant tsd-parent-kind-class tsd-is-static"> <a name="static-Top" class="tsd-anchor"></a> <h3> <span class="tsd-flag ts-flagStatic">Static</span> Top <span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type">Spot</a> </h3> <div class="tsd-comment tsd-typography"> <p>A synonym for <a href="Spot.html#static-TopCenter">Spot.TopCenter</a>.</p> </div> </section> <section class="tsd