UNPKG

routebar

Version:

A visual component for navigating between panel cells containing user content.

3,060 lines (808 loc) 67.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Moving - 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">Moving</h1> <section> <header> <h2> Moving </h2> <div class="class-description"><p>Класс управления панелью</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Moving"><span class="type-signature"></span>new Moving<span class="signature">(mainDiv, startScreen)</span><span class="type-signature"></span></h4> <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>mainDiv</code></td> <td class="type"> <span class="param-type">JQuery</span> </td> <td class="description last"><p>элемент, в котором располагается панель. Должен содержать класс rb-wrapper.</p></td> </tr> <tr> <td class="name"><code>startScreen</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line7">line 7</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="afterRenderDispatcher"><span class="type-signature"></span>afterRenderDispatcher<span class="type-signature"></span></h4> <div class="description"> <p>Диспетчер, выполняющий зарегистрированные функции после рендеринга контента моделей на странице после перехода Функциям в аргументы передается side и instance текущей панели.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moving.js.html">moving.js</a>, <a href="moving.js.html#line37">line 37</a> </li></ul></dd> </dl> <h4 class="name" id="beforeMoveDispatcher"><span class="type-signature"></span>beforeMoveDispatcher<span class="type-signature"></span></h4> <div class="description"> <p>Диспетчер, выполняющий зарегистрированные функции до выполнения перехода к новой ячейке в панели Функциям в аргументы передается side, instance текущей панели и флаг isWrongStep - удачный переход или нет. Если флаг равен null, то осуществляется moveBack. Функция может вернуть флаг или Promise. Если флаг равен false или Promise возвращает false, то переход не будет осуществлен.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moving.js.html">moving.js</a>, <a href="moving.js.html#line21">line 21</a> </li></ul></dd> </dl> <h4 class="name" id="beforeRenderDispatcher"><span class="type-signature"></span>beforeRenderDispatcher<span class="type-signature"></span></h4> <div class="description"> <p>Диспетчер, выполняющий зарегистрированные функции до рендеринга контента моделей на странице после перехода. Функциям в аргументы передается side и instance текущей панели.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moving.js.html">moving.js</a>, <a href="moving.js.html#line30">line 30</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="activate"><span class="type-signature"></span>activate<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="moving.js.html">moving.js</a>, <a href="moving.js.html#line528">line 528</a> </li></ul></dd> </dl> <h4 class="name" id="addPlugin"><span class="type-signature"></span>addPlugin<span class="signature">(plugin)</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>plugin</code></td> <td class="type"> <span class="param-type"><a href="IPlugin.html">IPlugin</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line602">line 602</a> </li></ul></dd> </dl> <h4 class="name" id="animateWrongSide"><span class="type-signature"></span>animateWrongSide<span class="signature">(side)</span><span class="type-signature"> &rarr; {Promise}</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>side</code></td> <td class="type"> <span class="param-type">string</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line449">line 449</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>promise о завершении действия</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="configure"><span class="type-signature"></span>configure<span class="signature">(config)</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>config</code></td> <td class="type"> <span class="param-type"><a href="Moving.html#~config">Moving~config</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line255">line 255</a> </li></ul></dd> </dl> <h4 class="name" id="destroy"><span class="type-signature"></span>destroy<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="moving.js.html">moving.js</a>, <a href="moving.js.html#line626">line 626</a> </li></ul></dd> </dl> <h4 class="name" id="getControlManager"><span class="type-signature"></span>getControlManager<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ControlManager.html">ControlManager</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line295">line 295</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>ControlManager</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="ControlManager.html">ControlManager</a></span> </dd> </dl> <h4 class="name" id="getScreenManager"><span class="type-signature"></span>getScreenManager<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="ScreenManager.html">ScreenManager</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line303">line 303</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>ScreenManager</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="ScreenManager.html">ScreenManager</a></span> </dd> </dl> <h4 class="name" id="goToScreen"><span class="type-signature"></span>goToScreen<span class="signature">(toScreen)</span><span class="type-signature"> &rarr; {Promise}</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>toScreen</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line538">line 538</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>promise о завершении переходов к намеченной цели</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="move"><span class="type-signature"></span>move<span class="signature">(side, isSaveHistory<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise|undefined}</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>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>side</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>сторона, в которую осуществляется переход</p></td> </tr> <tr> <td class="name"><code>isSaveHistory</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> true </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="moving.js.html">moving.js</a>, <a href="moving.js.html#line314">line 314</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>promise о завершении действия, либо undefined, если переход не требуется</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Promise</span> | <span class="param-type">undefined</span> </dd> </dl> <h4 class="name" id="moveBack"><span class="type-signature"></span>moveBack<span class="signature">()</span><span class="type-signature"> &rarr; {Promise|undefined}</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line408">line 408</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>promise о завершении действия, либо undefined, если переход не требуется</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Promise</span> | <span class="param-type">undefined</span> </dd> </dl> <h4 class="name" id="reload"><span class="type-signature"></span>reload<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Перезагрузить все панели на странице. Перезагрузка предполагает обновление верстки ячейки панели, сброс состояния в верстке. Если в элементах верстки есть подписки, необходимо позаботиться об отписке и последующей подписке к новым элементам верстки.</p> </div> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>side</code></td> <td class="type"> <span class="param-type">string</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line480">line 480</a> </li></ul></dd> </dl> <h4 class="name" id="removePlugin"><span class="type-signature"></span>removePlugin<span class="signature">(plugin)</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>plugin</code></td> <td class="type"> <span class="param-type"><a href="IPlugin.html">IPlugin</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="moving.js.html">moving.js</a>, <a href="moving.js.html#line614">line 614</a> </li></ul></dd> </dl> <h4 class="name" id="resetConfig"><span class="type-signature"></span>resetConfig<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="moving.js.html">moving.js</a>, <a href="moving.js.html#line83">line 83</a> </li></ul></dd> </dl> <h4 class="name" id="setScreen"><span class="type-signature"></span>setScreen<span class="signature">(screen, isSaveHistory<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise}</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>screen</code></td> <td class="type"> <span class="param-type"><a href="ScreenModel.html">ScreenModel</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>Устанавливаемая модель контента</p></td> </tr> <tr> <td class="name"><code>isSaveHistory</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="attributes"> &lt;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="moving.js.html">moving.js</a>, <a href="moving.js.html#line460">line 460</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>promise о завершении установки модели</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id="~config">config</h4> <div class="description"> <p>Конфигурация панели</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>wrongTime1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Время, затрачиваемое на первую часть неудачного перехода</p></td> </tr> <tr> <td class="name"><code>wrongTime2</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Время, затрачиваемое на вторую часть неудачного перехода</p></td> </tr> <tr> <td class="name"><code>correctTime</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Время, затрачиваемое на удачный переход</p></td> </tr> <tr> <td class="name"><code>wrongEasing1</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Анимация первой части неудачного перехода.<br> jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/</p></td> </tr> <tr> <td class="name"><code>wrongEasing2</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Анимация второй части неудачного перехода.<br> jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/</p></td> </tr> <tr> <td class="name"><code>correctEasing</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Анимация удачного перехода.<br> jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/</p></td> </tr> <tr> <td class="name"><code>hideArrowsAfterTime</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Скрывать ли стрелки перемещения после некоторого времени, чтобы можно было нажимать на элементы, которые находятся под этими стрелками.</p></td> </tr> <tr> <td class="name"><code>hideArrowsTime</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Через какой промежуток времени скрывать стрелки перемещения</p></td> </tr> <tr> <td class="name"><code>showArrowsOutside</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Показывать ли стрелки перемещения снаружи от панели (иначе показывать внутри панели)</p></td> </tr> <tr> <td class="name"><code>showArrowsOnHover</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Показывать ли стрелки при наведении мыши (иначе показывать всегда)</p></td> </tr> <tr> <td class="name"><code>loadingHtml</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">null</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Верстка ожидания, показываемая во время, пока контент еще не был вставлен в панель</p></td> </tr> <tr> <td class="name"><code>leftKey</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> | <span class="param-type">Array.&lt;(string|number)></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Клавиши, при нажатии на которые будет сделан переход влево. Могут использоваться строковые или числовые нотации клавиш.<br> http://www.javascripter.net/faq/keycodes.htm<br> https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes</p></td> </tr> <tr> <td class="name"><code>topKey</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> | <span class="param-type">Array.&lt;(string|number)></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Клавиши, при нажатии на которые будет сделан переход вверх.</p></td> </tr> <tr> <td class="name"><code>rightKey</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> | <span class="param-type">Array.&lt;(string|number)></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Клавиши, при нажатии на которые будет сделан переход вправо.</p></td> </tr> <tr> <td class="name"><code>bottomKey</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> | <span class="param-type">Array.&lt;(string|number)></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Клавиши, при нажатии на которые будет сделан переход вниз.</p></td> </tr> <tr> <td class="name"><code>maxHistoryLength</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Максимальная длина хранимой истории удачных переходов.</p></td> </tr> <tr> <td class="name"><code>lockControls</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Заблокированы ли элементы управления переходами, пока происходит анимация перехода (любые способы управления).</p></td> </tr> <tr> <td class="name"><code>showAdjacentScreens</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Отображать ли старую ячейку при анимации перехода на новую ячейку панели.</p></td> </tr> <tr> <td class="name"><code>saveHistoryInPool</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Хранить ли верстку ячеек панели, которые хранятся в истории переходов.</p></td> </tr> <tr> <td class="name"><code>pointersForSwipe</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Количество пальцев, необходимых для свайпа при переходе на новую ячейку на мобильных устройствах.</p></td> </tr> <tr> <td class="name"><code>isDirectPath</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Использовать ли при поиске кратчайшего пути до указанной модели только переходы от потомков к предкам и от предков к потомкам (иначе переходы по массивам предков и по массивам потомков тоже будут считаться отдельными переходами)</p></td> </tr> <tr> <td class="name"><code>savePrevious</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>сохранять ли предков (если шаг в сторону потомка) и потомков (если шаг в сторону предка), с которых был сделан переход, чтобы в дальнейшем вернутся в них при переходе обратно с ячейки, в которую был сделан переход.</p></td> </tr> <tr> <td class="name"><code>cyclicStep</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>делать ли цикличный переход в контексте массива моделей, в котором будет искаться новая модель.</p></td> </tr> <tr> <td class="name"><code>getRight</code></td> <td class="type"> <span class="param-type"><a href="Moving.html#~getRight">Moving~getRight</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>Функция, задающая алгоритм поиска ячейки, в которую должен быть осуществлен переход вправо</p></td> </tr> <tr> <td class="name"><code>getLeft</cod