routebar
Version:
A visual component for navigating between panel cells containing user content.
3,574 lines (938 loc) • 65.5 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ScreenModel - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Animation.html">Animation</a><ul class='methods'><li data-type='method'><a href="Animation.html#configure">configure</a></li><li data-type='method'><a href="Animation.html#destroy">destroy</a></li><li data-type='method'><a href="Animation.html#goToCenter">goToCenter</a></li><li data-type='method'><a href="Animation.html#goToCorrectSide">goToCorrectSide</a></li><li data-type='method'><a href="Animation.html#goToWrongSide">goToWrongSide</a></li></ul></li><li><a href="ArrowsControl.html">ArrowsControl</a><ul class='methods'><li data-type='method'><a href="ArrowsControl.html#configure">configure</a></li><li data-type='method'><a href="ArrowsControl.html#destroy">destroy</a></li><li data-type='method'><a href="ArrowsControl.html#disable">disable</a></li><li data-type='method'><a href="ArrowsControl.html#enable">enable</a></li><li data-type='method'><a href="ArrowsControl.html#isEnable">isEnable</a></li></ul></li><li><a href="BaseDispatcher.html">BaseDispatcher</a><ul class='methods'><li data-type='method'><a href="BaseDispatcher.html#add">add</a></li><li data-type='method'><a href="BaseDispatcher.html#configure">configure</a></li><li data-type='method'><a href="BaseDispatcher.html#destroy">destroy</a></li><li data-type='method'><a href="BaseDispatcher.html#remove">remove</a></li><li data-type='method'><a href="BaseDispatcher.html#runActions">runActions</a></li></ul></li><li><a href="ControlManager.html">ControlManager</a><ul class='methods'><li data-type='method'><a href="ControlManager.html#add">add</a></li><li data-type='method'><a href="ControlManager.html#configure">configure</a></li><li data-type='method'><a href="ControlManager.html#destroy">destroy</a></li><li data-type='method'><a href="ControlManager.html#disable">disable</a></li><li data-type='method'><a href="ControlManager.html#disableAll">disableAll</a></li><li data-type='method'><a href="ControlManager.html#enable">enable</a></li><li data-type='method'><a href="ControlManager.html#enableAll">enableAll</a></li><li data-type='method'><a href="ControlManager.html#enableByValues">enableByValues</a></li><li data-type='method'><a href="ControlManager.html#isEnable">isEnable</a></li><li data-type='method'><a href="ControlManager.html#remove">remove</a></li></ul></li><li><a href="KeydownControl.html">KeydownControl</a><ul class='methods'><li data-type='method'><a href="KeydownControl.html#configure">configure</a></li><li data-type='method'><a href="KeydownControl.html#destroy">destroy</a></li><li data-type='method'><a href="KeydownControl.html#disable">disable</a></li><li data-type='method'><a href="KeydownControl.html#enable">enable</a></li><li data-type='method'><a href="KeydownControl.html#isEnable">isEnable</a></li></ul></li><li><a href="module-Errors-ArgumentError.html">ArgumentError</a></li><li><a href="module-Errors-FatalError.html">FatalError</a></li><li><a href="module-Errors-NotRealizedError.html">NotRealizedError</a></li><li><a href="module-Errors-PathNotFoundError.html">PathNotFoundError</a></li><li><a href="Moving.html">Moving</a><ul class='methods'><li data-type='method'><a href="Moving.html#activate">activate</a></li><li data-type='method'><a href="Moving.html#addPlugin">addPlugin</a></li><li data-type='method'><a href="Moving.html#animateWrongSide">animateWrongSide</a></li><li data-type='method'><a href="Moving.html#configure">configure</a></li><li data-type='method'><a href="Moving.html#destroy">destroy</a></li><li data-type='method'><a href="Moving.html#getControlManager">getControlManager</a></li><li data-type='method'><a href="Moving.html#getScreenManager">getScreenManager</a></li><li data-type='method'><a href="Moving.html#goToScreen">goToScreen</a></li><li data-type='method'><a href="Moving.html#move">move</a></li><li data-type='method'><a href="Moving.html#moveBack">moveBack</a></li><li data-type='method'><a href="Moving.html#reload">reload</a></li><li data-type='method'><a href="Moving.html#removePlugin">removePlugin</a></li><li data-type='method'><a href="Moving.html#resetConfig">resetConfig</a></li><li data-type='method'><a href="Moving.html#setScreen">setScreen</a></li></ul></li><li><a href="ScreenManager.html">ScreenManager</a><ul class='methods'><li data-type='method'><a href="ScreenManager.html#clearHistory">clearHistory</a></li><li data-type='method'><a href="ScreenManager.html#configure">configure</a></li><li data-type='method'><a href="ScreenManager.html#destroy">destroy</a></li><li data-type='method'><a href="ScreenManager.html#findShortestPath">findShortestPath</a></li><li data-type='method'><a href="ScreenManager.html#getCurScreen">getCurScreen</a></li><li data-type='method'><a href="ScreenManager.html#getRelativeScreen">getRelativeScreen</a></li><li data-type='method'><a href="ScreenManager.html#popHistory">popHistory</a></li></ul></li><li><a href="ScreenModel.html">ScreenModel</a><ul class='methods'><li data-type='method'><a href="ScreenModel.html#.clearUpdateFn">clearUpdateFn</a></li><li data-type='method'><a href="ScreenModel.html#.configure">configure</a></li><li data-type='method'><a href="ScreenModel.html#.getMainScreen">getMainScreen</a></li><li data-type='method'><a href="ScreenModel.html#.registerUpdateFn">registerUpdateFn</a></li><li data-type='method'><a href="ScreenModel.html#.setMainScreen">setMainScreen</a></li><li data-type='method'><a href="ScreenModel.html#.unregisterUpdateFn">unregisterUpdateFn</a></li><li data-type='method'><a href="ScreenModel.html#childrenLength">childrenLength</a></li><li data-type='method'><a href="ScreenModel.html#defaultChildIndex">defaultChildIndex</a></li><li data-type='method'><a href="ScreenModel.html#defaultParentIndex">defaultParentIndex</a></li><li data-type='method'><a href="ScreenModel.html#getChild">getChild</a></li><li data-type='method'><a href="ScreenModel.html#getChildIndex">getChildIndex</a></li><li data-type='method'><a href="ScreenModel.html#getParent">getParent</a></li><li data-type='method'><a href="ScreenModel.html#getParentIndex">getParentIndex</a></li><li data-type='method'><a href="ScreenModel.html#html">html</a></li><li data-type='method'><a href="ScreenModel.html#isDirectedGraph">isDirectedGraph</a></li><li data-type='method'><a href="ScreenModel.html#isTemporary">isTemporary</a></li><li data-type='method'><a href="ScreenModel.html#parentsLength">parentsLength</a></li><li data-type='method'><a href="ScreenModel.html#pushChildren">pushChildren</a></li><li data-type='method'><a href="ScreenModel.html#pushParents">pushParents</a></li><li data-type='method'><a href="ScreenModel.html#removeChild">removeChild</a></li><li data-type='method'><a href="ScreenModel.html#removeParent">removeParent</a></li><li data-type='method'><a href="ScreenModel.html#resetChildren">resetChildren</a></li><li data-type='method'><a href="ScreenModel.html#resetParents">resetParents</a></li><li data-type='method'><a href="ScreenModel.html#sortChildren">sortChildren</a></li><li data-type='method'><a href="ScreenModel.html#sortParents">sortParents</a></li><li data-type='method'><a href="ScreenModel.html#toString">toString</a></li></ul></li><li><a href="SwipesControl.html">SwipesControl</a><ul class='methods'><li data-type='method'><a href="SwipesControl.html#configure">configure</a></li><li data-type='method'><a href="SwipesControl.html#destroy">destroy</a></li><li data-type='method'><a href="SwipesControl.html#disable">disable</a></li><li data-type='method'><a href="SwipesControl.html#enable">enable</a></li><li data-type='method'><a href="SwipesControl.html#isEnable">isEnable</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-Batch.html">Batch</a><ul class='methods'><li data-type='method'><a href="module-Batch.html#.animateWrongSide">animateWrongSide</a></li><li data-type='method'><a href="module-Batch.html#.configure">configure</a></li><li data-type='method'><a href="module-Batch.html#.move">move</a></li><li data-type='method'><a href="module-Batch.html#.moveBack">moveBack</a></li><li data-type='method'><a href="module-Batch.html#.reload">reload</a></li><li data-type='method'><a href="module-Batch.html#.removeAll">removeAll</a></li><li data-type='method'><a href="module-Batch.html#.setScreen">setScreen</a></li></ul></li><li><a href="module-Errors.html">Errors</a></li><li><a href="module-MainModule.html">MainModule</a></li><li><a href="module-RbManager.html">RbManager</a><ul class='methods'><li data-type='method'><a href="module-RbManager.html#.init">init</a></li><li data-type='method'><a href="module-RbManager.html#.remove">remove</a></li></ul></li><li><a href="module-Utils.html">Utils</a><ul class='methods'><li data-type='method'><a href="module-Utils.html#.capitalizeFirstLetter">capitalizeFirstLetter</a></li><li data-type='method'><a href="module-Utils.html#.cycledNumber">cycledNumber</a></li><li data-type='method'><a href="module-Utils.html#.getStartSide">getStartSide</a></li><li data-type='method'><a href="module-Utils.html#.inherite">inherite</a></li><li data-type='method'><a href="module-Utils.html#.mixin">mixin</a></li><li data-type='method'><a href="module-Utils.html#.mobileCheck">mobileCheck</a></li><li data-type='method'><a href="module-Utils.html#.nop">nop</a></li><li data-type='method'><a href="module-Utils.html#.oppositeSide">oppositeSide</a></li></ul></li></ul><h3>Interfaces</h3><ul><li><a href="IControl.html">IControl</a><ul class='methods'><li data-type='method'><a href="IControl.html#configure">configure</a></li><li data-type='method'><a href="IControl.html#destroy">destroy</a></li><li data-type='method'><a href="IControl.html#disable">disable</a></li><li data-type='method'><a href="IControl.html#enable">enable</a></li><li data-type='method'><a href="IControl.html#isEnable">isEnable</a></li></ul></li><li><a href="IPlugin.html">IPlugin</a><ul class='methods'><li data-type='method'><a href="IPlugin.html#configure">configure</a></li><li data-type='method'><a href="IPlugin.html#destroy">destroy</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">ScreenModel</h1>
<section>
<header>
<h2>
ScreenModel
</h2>
<div class="class-description"><p>Модель контента, отображаемая в ячейке панели.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="ScreenModel"><span class="type-signature"></span>new ScreenModel<span class="signature">(html<span class="signature-attributes">opt</span>, children<span class="signature-attributes">opt</span>, parents<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>html</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type"><a href="ScreenModel.html#~ScreenConfig">ScreenModel~ScreenConfig</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>контент модели</p></td>
</tr>
<tr>
<td class="name"><code>children</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>потомки модели</p></td>
</tr>
<tr>
<td class="name"><code>parents</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>предки модели</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line23">line 23</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".clearUpdateFn"><span class="type-signature">(static) </span>clearUpdateFn<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Очистить набор функций для запуска, когда изменится структура графа</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line450">line 450</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".configure"><span class="type-signature">(static) </span>configure<span class="signature">(config)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Устанавливает конфигурацию моделей по умолчанию. Изначальные значения по умоланию: <br>
isPermanent: false, <br>
isDirectedGraph: true, <br>
defaultChildIndex: 0, <br>
defaultParentIndex: 0</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>config</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html#~DefaultScreenConfig">ScreenModel~DefaultScreenConfig</a></span>
</td>
<td class="description last"><p>конфигурация</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line394">line 394</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".getMainScreen"><span class="type-signature">(static) </span>getMainScreen<span class="signature">()</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Получить модель по умолчанию</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line425">line 425</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>модель по умолчанию</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id=".registerUpdateFn"><span class="type-signature">(static) </span>registerUpdateFn<span class="signature">(fn)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Зарегистрировать функцию для запуска, когда изменится структура графа</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>fn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>функция для запуска</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line433">line 433</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".setMainScreen"><span class="type-signature">(static) </span>setMainScreen<span class="signature">(screen)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Установить модель по умолчанию, она будет использоваться в качестве стартовой для панелей, если при старте не заданы иные модели.
Если модель по умолчанию не установлена вручную, будет использован первый созданный экземпляр модели.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>screen</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</td>
<td class="description last"><p>модель по умолчанию</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line416">line 416</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-RbManager.html#.init"><code>module:RbManager.init</code></a></li>
</ul>
</dd>
</dl>
<h4 class="name" id=".unregisterUpdateFn"><span class="type-signature">(static) </span>unregisterUpdateFn<span class="signature">(fn)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Удалить функцию из списка функций для запуска, когда изменится структура графа</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>fn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>функция для запуска</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line441">line 441</a>
</li></ul></dd>
</dl>
<h4 class="name" id="childrenLength"><span class="type-signature"></span>childrenLength<span class="signature">()</span><span class="type-signature"> → {Number}</span></h4>
<div class="description">
<p>Возвращает количество потомков.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line226">line 226</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>количество потомков</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id="defaultChildIndex"><span class="type-signature"></span>defaultChildIndex<span class="signature">(index<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {number}</span></h4>
<div class="description">
<p>Возвращает индекс модели по умолчанию среди моделей-потомков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>если задан индекс, он будет установлен как значение по умолчанию</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line122">line 122</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>индекс модели по умолчанию среди моделей-потомков</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id="defaultParentIndex"><span class="type-signature"></span>defaultParentIndex<span class="signature">(index<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {number}</span></h4>
<div class="description">
<p>Возвращает индекс модели по умолчанию среди моделей-предков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>если задан индекс, он будет установлен как значение по умолчанию</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line134">line 134</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>индекс модели по умолчанию среди моделей-предков</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id="getChild"><span class="type-signature"></span>getChild<span class="signature">(child)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Находит модель среди набора потомков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>искомая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line245">line 245</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>искомая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="getChildIndex"><span class="type-signature"></span>getChildIndex<span class="signature">(child)</span><span class="type-signature"> → {number}</span></h4>
<div class="description">
<p>Находит индекс модели среди набора потомков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>искомая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line236">line 236</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>искомый индекс модели</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id="getParent"><span class="type-signature"></span>getParent<span class="signature">(parent)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Находит модель среди набора предков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>искомая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line332">line 332</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>искомая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="getParentIndex"><span class="type-signature"></span>getParentIndex<span class="signature">(parent)</span><span class="type-signature"> → {number}</span></h4>
<div class="description">
<p>Находит индекс модели среди набора предков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>искомая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line323">line 323</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>искомый индекс модели</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id="html"><span class="type-signature"></span>html<span class="signature">(html<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>Возвращает контент модели</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>html</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>если аргумент задан, он будет установлен в качестве контента модели</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line92">line 92</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>контент модели</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="isDirectedGraph"><span class="type-signature"></span>isDirectedGraph<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>Возвращает опцию "ориентированный граф". Если true, модель является частью ориентированного графа.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line113">line 113</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>опция "ориентированный граф"</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="isTemporary"><span class="type-signature"></span>isTemporary<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>Возвращает опцию "временная модель". Если модель временная, она не будет храниться на странице, если не отображается.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line105">line 105</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>опция "временная модель"</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="parentsLength"><span class="type-signature"></span>parentsLength<span class="signature">()</span><span class="type-signature"> → {Number}</span></h4>
<div class="description">
<p>Возвращает количество предков.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line313">line 313</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>количество предков</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id="pushChildren"><span class="type-signature"></span>pushChildren<span class="signature">(children)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Добавить набор моделей в конец к набору потомков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>children</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
|
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</td>
<td class="description last"><p>набор добавляемый моделей</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line266">line 266</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="pushParents"><span class="type-signature"></span>pushParents<span class="signature">(parents)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Добавить набор моделей в конец к набору предков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parents</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
|
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</td>
<td class="description last"><p>набор добавляемый моделей</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line353">line 353</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="removeChild"><span class="type-signature"></span>removeChild<span class="signature">(child)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Удаляет модель из набора потомков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>удаляемая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line255">line 255</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="removeParent"><span class="type-signature"></span>removeParent<span class="signature">(parent)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Удаляет модель из набора предков</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
|
<span class="param-type">string</span>
|
<span class="param-type">number</span>
</td>
<td class="description last"><p>удаляемая модель, ее идентификатор или порядковый номер в наборе</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line342">line 342</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="resetChildren"><span class="type-signature"></span>resetChildren<span class="signature">(children<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Переопределить набор моделей потомков, то есть удалить старые и установить новые</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>children</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>набор добавляемый моделей</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line286">line 286</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="resetParents"><span class="type-signature"></span>resetParents<span class="signature">(parents<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Переопределить набор моделей предков, то есть удалить старые и установить новые</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parents</code></td>
<td class="type">
<span class="param-type">Array.<<a href="ScreenModel.html">ScreenModel</a>></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>набор добавляемый моделей</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="screenModel.js.html">screenModel.js</a>, <a href="screenModel.js.html#line374">line 374</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>текущая модель</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span>
</dd>
</dl>
<h4 class="name" id="sortChildren"><span class="type-signature"></span>sortChildren<span class="signature">(compareFn<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="ScreenModel.html">ScreenModel</a>}</span></h4>
<div class="description">
<p>Сортирует набор потомков. Сортировка происходит по правилам сортировки массива.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>compareFn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="at