UNPKG

markgojs

Version:

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

1,654 lines (580 loc) 67.1 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>GoJS&reg; LayoutNetwork Class</title> <script src="../../assets/js/jquery.min.js"></script> <script src="../../assets/js/bootstrap.min.js"></script> <script src="../../assets/js/highlight.js"></script> <script src="../../assets/js/api.js"></script> <script src="../../assets/js/fuse.min.js"></script> <link href="../../assets/css/bootstrap.min.css" rel="stylesheet" > <!-- custom CSS after bootstrap --> <link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/> <link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/> <!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />--> <link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" /> </head> <body> <!-- 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">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="container-fluid"> <!-- ============================== classes index ============================ --> <div id="navindex" class="col-md-2"> <!-- begin publish.classesIndex --> <!-- <div><a href="../index.html">GoJS Class Index</a></div> --> <div class="sidebar-nav"> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Diagram Classes</span> </div> </div> <div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li> <li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li> <li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li> <li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li> <li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li> <li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li> <li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li> <li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li> <li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li> <li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li> <li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li> <li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li> <li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li> <li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li> <li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li> <li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li> <li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li> <li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li> <li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li> <li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li> </ul> </div> </div> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Geometry Classes</span> </div> </div> <div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li> <li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li> <li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li> <li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li> <li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li> <li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li> <li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li> <li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li> <li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li> </ul> </div> </div> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Model Classes</span> </div> </div> <div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li> <li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li> <li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li> <li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li> <li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li> <li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li> <li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li> </ul> </div> </div> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Layout Classes</span> </div> </div> <div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li> <li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li> <li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li> <li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li> <li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li> <li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li> <li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li> </ul> </div> </div> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Tool Classes</span> </div> </div> <div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li> <li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li> <li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li> <li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li> <li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li> <li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li> <li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li> <li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li> <li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li> <li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li> <li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li> <li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li> <li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li> <li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li> <li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li> <li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li> <li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li> </ul> </div> </div> <div class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <div class="navheader-container"> <div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <span class="navbar-brand">Collection Classes</span> </div> </div> <div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse"> <ul class="classList nav navbar-nav"> <li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li> <li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li> <li><a href="../symbols/List.html" class="linkConstructor">List</a></li> <li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li> <li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li> </ul> </div> </div> </div> <!-- /class="sidebar-nav --> <!-- end publish.classesIndex --> </div> <div id="contentBody" class="col-md-10"> <div class="searchsumm"> <div class="table-wrap"> <div class="table-cell" id="apisearch" data-base="../"> <div class="title">Search API</div> <div class="field"> <label for="search-field" class="search-icon"></label> <input id="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> </div> <div class="table-cell" id="apisumm"> <input type="checkbox" id="showsumms" /> <label class="apisumms" for="showsumms">Show Summaries</label> </div> </div> </div> <!-- ============================== header ================================= --> <div id="header" class="fineprint"> <b>GoJS</b>&reg; Diagramming Components<br/>version 1.8.36 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a> </div> <!-- ============================== class title ============================ --> <h2 class="classTitle"> Class LayoutNetwork </h2> <!-- ============================== class summary ========================== --> <p class="classsummary"> This provides an abstract view of a diagram as a network (graph) of vertexes and directed edges. The network contains vertexes and edges corresponding to <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s. <p> This class provides a framework for manipulating the state of nodes and links without modifying the structure of the diagram. Having a separate representation also permits adding or removing vertexes or edges from the network so that the graph that is laid out is not isomorphic to the diagram's graph. <p> For each kind of layout that uses a LayoutNetwork there is a subclass of <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a> and a subclass of <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>: <ul> <li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a>: <a href="../symbols/CircularVertex.html" class="linkConstructor">CircularVertex</a> and <a href="../symbols/CircularEdge.html" class="linkConstructor">CircularEdge</a></li> <li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a>: <a href="../symbols/ForceDirectedVertex.html" class="linkConstructor">ForceDirectedVertex</a> and <a href="../symbols/ForceDirectedEdge.html" class="linkConstructor">ForceDirectedEdge</a></li> <li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a>: <a href="../symbols/LayeredDigraphVertex.html" class="linkConstructor">LayeredDigraphVertex</a> and <a href="../symbols/LayeredDigraphEdge.html" class="linkConstructor">LayeredDigraphEdge</a></li> <li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a>: <a href="../symbols/TreeVertex.html" class="linkConstructor">TreeVertex</a> and <a href="../symbols/TreeEdge.html" class="linkConstructor">TreeEdge</a></li> </ul> <p> Modifying a <a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a> or a <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a> or a <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a> does not invalidate the <a href="../symbols/Layout.html" class="linkConstructor">Layout</a> or raise any changed events. </p> <!-- ============================== constructor summary ==================== --> <h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2> <div class="table-responsive"> <table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class LayoutNetwork."> <thead> <tr> <th scope="col" class="name">Name</th> <th scope="col" class="description">Description</th> </tr> </thead> <tbody> <tr> <td class="name" > <div class="name"> LayoutNetwork() </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>This constructs an empty network.<span class="nodetails" id="xconLayoutNetwork"><a class="morelink" onclick="hst('conLayoutNetwork')">More...</a></span> <span class="details" id="conLayoutNetwork"> It is commonplace to call <a href="../symbols/LayoutNetwork.html#addParts" class="linkMethod">addParts</a> to build up the network to have the same structure as a <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>'s or <a href="../symbols/Group.html" class="linkConstructor">Group</a>'s nodes and links.</span> </div> </td> </tr> </tbody> </table> </div><!-- class="table-responsive">--> <!-- ============================== properties summary ===================== --> <h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2> <div class="table-responsive"> <table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class LayoutNetwork."> <thead> <tr> <th scope="col" class="name">Name, Value Type</th> <th scope="col" class="description">Description</th> </tr> </thead> <tbody> <tr id="edges" > <td class="name"> <div class="name"> edges </div> <div class="attributes"> <span class="light">{Set.<E>}</span> </div> </td> <td class="description"> <div class="description"> <!--newp <p> --> <p>Gets a collection of all of the <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>s in this network.<span class="nodetails" id="xpropedges"><a class="morelink" onclick="hst('propedges')">More...</a></span> <span class="details" id="propedges"> Do not modify this collection directly. Instead, call <a href="../symbols/LayoutNetwork.html#addEdge" class="linkMethod">addEdge</a>, <a href="../symbols/LayoutNetwork.html#deleteEdge" class="linkMethod">deleteEdge</a>, <a href="../symbols/LayoutNetwork.html#addLink" class="linkMethod">addLink</a>, or <a href="../symbols/LayoutNetwork.html#deleteLink" class="linkMethod">deleteLink</a>.</span> </div> </td> </tr> <tr id="layout" > <td class="name"> <div class="name"> layout </div> <div class="attributes"> <span class="light">{Y}</span> </div> </td> <td class="description"> <div class="description"> <!--newp <p> --> <p>Gets the <a href="../symbols/Layout.html" class="linkConstructor">Layout</a> that uses this network of <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>es and <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>s.<span class="nodetails" id="xproplayout"><a class="morelink" onclick="hst('proplayout')">More...</a></span> <span class="details" id="proplayout"> The default value is null. It is set automatically for you when this setting <a href="../symbols/Layout.html#network" class="linkProperty">Layout.network</a>.</span> </div> </td> </tr> <tr id="vertexes" > <td class="name"> <div class="name"> vertexes </div> <div class="attributes"> <span class="light">{Set.<V>}</span> </div> </td> <td class="description"> <div class="description"> <!--newp <p> --> <p>Gets a collection of all of the <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>es in this network.<span class="nodetails" id="xpropvertexes"><a class="morelink" onclick="hst('propvertexes')">More...</a></span> <span class="details" id="propvertexes"> Do not modify this collection directly. Instead, call <a href="../symbols/LayoutNetwork.html#addVertex" class="linkMethod">addVertex</a>, <a href="../symbols/LayoutNetwork.html#deleteVertex" class="linkMethod">deleteVertex</a>, <a href="../symbols/LayoutNetwork.html#addNode" class="linkMethod">addNode</a>, or <a href="../symbols/LayoutNetwork.html#deleteNode" class="linkMethod">deleteNode</a>.</span> </div> </td> </tr> </tbody> </table> </div><!-- class="table-responsive">--> <!-- ============================== methods summary ======================== --> <h2 class="summaryCaption">Method <span class="nodetails"> Summary</span><span class="details"> Details</span></h2> <div class="table-responsive"> <table class="summaryTable table table-bordered table-condensed" summary="A summary of the methods documented in the class LayoutNetwork."> <thead> <tr> <th scope="col" class="name">Name, Return Type</th> <th scope="col" class="description">Description</th> </tr> </thead> <tbody> <tr id="addEdge"> <td class="name"> <div class="name"> addEdge(edge) </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Adds a <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a> to the network.<span class="nodetails" id="xmethaddEdge"><a class="morelink" onclick="hst('methaddEdge')">More...</a></span> <span class="details" id="methaddEdge"> Although this method is provided for completeness, <a href="../symbols/LayoutNetwork.html#linkVertexes" class="linkMethod">linkVertexes</a> provides a more efficient manner of linking vertexes already in the network.</span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{E}</span> <b>edge</b> </dt> <dd></dd> </dl> </div> </td> </tr> <tr id="addLink"> <td class="name"> <div class="name"> addLink(link) </div> <div class="attributes"> <span class="light">{E}</span> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>This convenience method makes sure there is a <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a> in this network corresponding to a <a href="../symbols/Link.html" class="linkConstructor">Link</a>.<span class="nodetails" id="xmethaddLink"><a class="morelink" onclick="hst('methaddLink')">More...</a></span> <span class="details" id="methaddLink"> If <a href="../symbols/LayoutNetwork.html#findEdge" class="linkMethod">findEdge</a> returns null, this method creates a new <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>, makes sure the <a href="../symbols/Link.html#fromNode" class="linkProperty">Link.fromNode</a> and <a href="../symbols/Link.html#toNode" class="linkProperty">Link.toNode</a> have corresponding <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>es in the network, and adds the edge itself to the network.</span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{<a href="../symbols/Link.html" class="linkConstructor">Link</a>}</span> <b>link</b> </dt> <dd></dd> </dl> <dl class="detailList"> <dt class="heading">Returns:</dt> <dt><span class="light fixedFont">{E}</span> an edge in this network.</dt> </dl> </div> </td> </tr> <tr id="addNode"> <td class="name"> <div class="name"> addNode(node) </div> <div class="attributes"> <span class="light">{V}</span> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>This convenience method makes sure there is a <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a> in this network corresponding to a <a href="../symbols/Node.html" class="linkConstructor">Node</a>.<span class="nodetails" id="xmethaddNode"><a class="morelink" onclick="hst('methaddNode')">More...</a></span> <span class="details" id="methaddNode"></span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>}</span> <b>node</b> </dt> <dd></dd> </dl> <dl class="detailList"> <dt class="heading">Returns:</dt> <dt><span class="light fixedFont">{V}</span> a vertex in this network.</dt> </dl> </div> </td> </tr> <tr id="addParts"> <td class="name"> <div class="name"> addParts(parts, toplevelonly, pred) </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Creates a network of <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>es and <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>s corresponding to the given <a href="../symbols/Node.html" class="linkConstructor">Node</a>s and <a href="../symbols/Link.html" class="linkConstructor">Link</a>s.<span class="nodetails" id="xmethaddParts"><a class="morelink" onclick="hst('methaddParts')">More...</a></span> <span class="details" id="methaddParts"> This is usually more convenient than repeatedly calling <a href="../symbols/LayoutNetwork.html#addNode" class="linkMethod">addNode</a> and <a href="../symbols/LayoutNetwork.html#addLink" class="linkMethod">addLink</a>. This method ignores all instances of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s that are not Nodes or Links. This will recurse through <a href="../symbols/Group.html" class="linkConstructor">Group</a>s that have no <a href="../symbols/Group.html#layout" class="linkProperty">Group.layout</a>.</span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Iterable.<Part>}</span> <b>parts</b> </dt> <dd>A collection of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s or <a href="../symbols/Link.html" class="linkConstructor">Link</a>s.</dd> <dt> <span class="light fixedFont">{boolean=}</span> <b>toplevelonly</b> </dt> <dd>whether to skip Parts in the given collection that are contained by Groups; default is false</dd> <dt> <span class="light fixedFont">{function(Part):boolean|null=}</span> <b>pred</b> </dt> <dd>optional predicate to apply to each Part -- if it returns false do not include Vertex or Edge in the network; default ignores link label nodes or links connecting with them</dd> </dl> </div> </td> </tr> <tr id="addVertex"> <td class="name"> <div class="name"> addVertex(vertex) </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Adds a <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a> to the network.<span class="nodetails" id="xmethaddVertex"><a class="morelink" onclick="hst('methaddVertex')">More...</a></span> <span class="details" id="methaddVertex"></span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{V}</span> <b>vertex</b> </dt> <dd></dd> </dl> </div> </td> </tr> <tr id="createEdge"> <td class="name"> <div class="name"> createEdge() </div> <div class="attributes"> <span class="light">{E}</span> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Allocate a new instance of <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>.<span class="nodetails" id="xmethcreateEdge"><a class="morelink" onclick="hst('methcreateEdge')">More...</a></span> <span class="details" id="methcreateEdge"> This is overridden in LayoutNetwork subclasses to create instances of subclasses of <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a>. Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</span> <dl class="detailList"> <dt class="heading">Returns:</dt> <dt><span class="light fixedFont">{E}</span> </dt> </dl> </div> </td> </tr> <tr id="createVertex"> <td class="name"> <div class="name"> createVertex() </div> <div class="attributes"> <span class="light">{V}</span> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Allocate a new instance of <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>.<span class="nodetails" id="xmethcreateVertex"><a class="morelink" onclick="hst('methcreateVertex')">More...</a></span> <span class="details" id="methcreateVertex"> This is overridden in LayoutNetwork subclasses to create instances of subclasses of <a href="../symbols/LayoutVertex.html" class="linkConstructor">LayoutVertex</a>. Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</span> <dl class="detailList"> <dt class="heading">Returns:</dt> <dt><span class="light fixedFont">{V}</span> </dt> </dl> </div> </td> </tr> <tr id="deleteArtificialVertexes"> <td class="name"> <div class="name"> deleteArtificialVertexes() </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Deletes all vertexes and edges that have no <a href="../symbols/Part.html" class="linkConstructor">Part</a> associated with them. </div> </td> </tr> <tr id="deleteEdge"> <td class="name"> <div class="name"> deleteEdge(edge) </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>Removes a <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a> from the network.<span class="nodetails" id="xmethdeleteEdge"><a class="morelink" onclick="hst('methdeleteEdge')">More...</a></span> <span class="details" id="methdeleteEdge"></span> <dl class="detailList"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{E}</span> <b>edge</b> </dt> <dd></dd> </dl> </div> </td> </tr> <tr id="deleteLink"> <td class="name"> <div class="name"> deleteLink(link) </div> <div class="attributes"> </div> </td> <td class="description"> <div class="description"> <!--newp--><p><p>This convenience method deletes from this network any <a href="../symbols/LayoutEdge.html" class="linkConstructor">LayoutEdge</a> corresponding to a <a href="../symbols/Link.html" class="linkConstructor">Link</a>.<span class="nodetails" id="xmethdeleteLink"><a class="morelink" onclick="hst('methdeleteLink')">More...</a></span> <span class="details" id="methdeleteLink"></span> <dl class="detailList"> <dt class="heading">Par