soocrate-core
Version:
this is the core of soocrate application
1,892 lines (976 loc) • 42.9 kB
HTML
<html>
<head>
<meta charset="utf-8">
<base data-ice="baseUrl" href="../../">
<title data-ice="title">Marker | jquery-crate</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
<script src="script/prettify/prettify.js"></script>
<script src="script/manual.js"></script>
<meta name="description" content="Cratify tool that turns a division into a distributed and decentralized collaborative editor"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="jquery-crate"><meta property="twitter:description" content="Cratify tool that turns a division into a distributed and decentralized collaborative editor"></head>
<body class="layout-container" data-ice="rootContainer">
<header>
<a href="./">Home</a>
<a href="identifiers.html">Reference</a>
<a href="source.html">Source</a>
<div class="search-box">
<span>
<img src="./image/search.png">
<span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
</span>
<ul class="search-result"></ul>
</div>
<a style="position:relative; top:3px;" href="https://github.com/haouarin/jquery-crate.git"><img width="20px" src="./image/github.png"></a></header>
<nav class="navigation" data-ice="nav"><div>
<ul>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/view/marker.js~Marker.html">Marker</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-Editor">Editor</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-LinkView">LinkView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-StatesHeader">StatesHeader</a></span></span></li>
</ul>
</div>
</nav>
<div class="content" data-ice="content"><div class="header-notice">
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import Marker from '<span><a href="file/view/marker.js.html#lineNumber10">jquery-crate/view/marker.js</a></span>'</code></pre></div>
<span data-ice="access">public</span>
<span data-ice="kind">class</span>
<span data-ice="source">| <span><a href="file/view/marker.js.html#lineNumber10">source</a></span></span>
</div>
<div class="self-detail detail">
<h1 data-ice="name">Marker</h1>
<div class="description" data-ice="description"><p>Marker is class for managing the marker of one user,it includes the caret, avatar, and pseudo Names.</p>
</div>
</div>
<div data-ice="constructorSummary"><h2>Constructor Summary</h2><table class="summary" data-ice="summary">
<thead><tr><td data-ice="title" colspan="3">Public Constructor</td></tr></thead>
<tbody>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-constructor-constructor">constructor</a></span></span><span class="code" data-ice="signature">(origin: <span>[string]</span>, lifeTime: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span>, range: <span>[{index: index,length: 0}]</span>, cursorsp: <span>[cursor module]</span>, cursor: <span>[Boolean]</span>, isItME: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span>)</span>
</p>
</div>
<div>
<div data-ice="description"><p>Marker Module manages the Carets, avatars, pseudo names for the different users of the document</p>
</div>
</div>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<div data-ice="memberSummary"><h2>Member Summary</h2><table class="summary" data-ice="summary">
<thead><tr><td data-ice="title" colspan="3">Public Members</td></tr></thead>
<tbody>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-animal">animal</a></span></span><span class="code" data-ice="signature">: <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>auto generated pseudo name (from animals list)</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-avatarAdd">avatarAdd</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p>add or not the avatar </p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-color">color</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p>color r,g,b</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-colorRGB">colorRGB</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p>color rgb(r,g,b)</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-colorRGBLight">colorRGBLight</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p> color rgba(r,g,b,0.5)</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-cursor">cursor</a></span></span><span class="code" data-ice="signature">: <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>true for an editor, false if it is from a ping</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-lifeTime">lifeTime</a></span></span><span class="code" data-ice="signature">: <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>lifeTime After this time, if no ping or Caret position is received =>
remove caret and avatar.</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-origin">origin</a></span></span><span class="code" data-ice="signature">: <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p> origin the id of the the user</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-pseudoName">pseudoName</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p>Anonymous + auto generated pseudo name</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-time">time</a></span></span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a></span></span>
</p>
</div>
<div>
<div data-ice="description"><p>used to store last update time to detected outdated users</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-member-timer">timer</a></span></span><span class="code" data-ice="signature">: <span>[type]</span>: <span>*</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>a timer that is used to check if the user is Outdated</p>
</div>
</div>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<div data-ice="methodSummary"><h2>Method Summary</h2><table class="summary" data-ice="summary">
<thead><tr><td data-ice="title" colspan="3">Public Methods</td></tr></thead>
<tbody>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-addAvatar">addAvatar</a></span></span><span class="code" data-ice="signature">(divID: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>)</span>
</p>
</div>
<div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-addCursor">addCursor</a></span></span><span class="code" data-ice="signature">(range: <span>[{index: index,length: 0}]</span>)</span>
</p>
</div>
<div>
<div data-ice="description"><p>addCursor add the cursor to the editor</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-capitalize">capitalize</a></span></span><span class="code" data-ice="signature">(s: <span>[string]</span>): <span>[string]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>capitalize uppercase the first letter</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-checkIfOutdated">checkIfOutdated</a></span></span><span class="code" data-ice="signature">()</span>
</p>
</div>
<div>
<div data-ice="description"><p>checkIfOutdated check if the user is outdated and if it is the case remove its caret and avatar </p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-getAvatar">getAvatar</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>getAvatar return the div that contains this user id</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-getColor">getColor</a></span></span><span class="code" data-ice="signature">(str: <span>[string]</span>): <span>[(r,g,b))]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>getColor for a specific id, get a unique color</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-removeAvatar">removeAvatar</a></span></span><span class="code" data-ice="signature">(): <span>[type]</span></span>
</p>
</div>
<div>
<div data-ice="description"><p>removeAvatar remove the avatar of the user from the interface</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-setPseudo">setPseudo</a></span></span><span class="code" data-ice="signature">(Pseudo: <span>[type]</span>)</span>
</p>
</div>
<div>
<div data-ice="description"><p>setPseudo set pseudo for the user</p>
</div>
</div>
</td>
<td>
</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>
<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>
<span class="code" data-ice="name"><span><a href="class/view/marker.js~Marker.html#instance-method-update">update</a></span></span><span class="code" data-ice="signature">(range: <span>[{index: index,length: 0}]</span>, cursor: <span>[boolean]</span>)</span>
</p>
</div>
<div>
<div data-ice="description"><p>update the time to keep the avatar and cursor if it exist</p>
</div>
</div>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<div data-ice="constructorDetails"><h2 data-ice="title">Public Constructors</h2>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-constructor-constructor">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">constructor</span><span class="code" data-ice="signature">(origin: <span>[string]</span>, lifeTime: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span>, range: <span>[{index: index,length: 0}]</span>, cursorsp: <span>[cursor module]</span>, cursor: <span>[Boolean]</span>, isItME: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span>)</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber21">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>Marker Module manages the Carets, avatars, pseudo names for the different users of the document</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">origin</td>
<td data-ice="type" class="code"><span>[string]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>the id of the the user</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">lifeTime</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>After this time, if no ping or Caret position is received =>
remove caret and avatar. if lifetime is -1 we didn't add the avatar</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">range</td>
<td data-ice="type" class="code"><span>[{index: index,length: 0}]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>range stars from index with the specified length</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">cursorsp</td>
<td data-ice="type" class="code"><span>[cursor module]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>the used cursor module for quilljs</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">cursor</td>
<td data-ice="type" class="code"><span>[Boolean]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>create the caret or not. If it is from ping, it will be false else true</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">isItME</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>is it my caret ? true or false to disable the time if it is true</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div data-ice="memberDetails"><h2 data-ice="title">Public Members</h2>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-animal">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">animal</span><span class="code" data-ice="signature">: <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber63">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>auto generated pseudo name (from animals list)</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-avatarAdd">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">avatarAdd</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber76">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>add or not the avatar </p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-color">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">color</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber45">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>color r,g,b</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-colorRGB">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">colorRGB</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber51">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>color rgb(r,g,b)</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-colorRGBLight">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">colorRGBLight</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber57">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p> color rgba(r,g,b,0.5)</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-cursor">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">cursor</span><span class="code" data-ice="signature">: <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber82">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>true for an editor, false if it is from a ping</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-lifeTime">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">lifeTime</span><span class="code" data-ice="signature">: <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber33">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>lifeTime After this time, if no ping or Caret position is received =>
remove caret and avatar. if lifetime is -1 we don't add the avatar</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-origin">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">origin</span><span class="code" data-ice="signature">: <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber26">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p> origin the id of the the user</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-pseudoName">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">pseudoName</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber69">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>Anonymous + auto generated pseudo name</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-time">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">time</span><span class="code" data-ice="signature">: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a></span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber39">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>used to store last update time to detected outdated users</p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-member-timer">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">timer</span><span class="code" data-ice="signature">: <span>[type]</span>: <span>*</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber90">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>a timer that is used to check if the user is Outdated</p>
</div>
<div data-ice="properties">
</div>
<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>[type]</span></td>
<td class="return-desc" data-ice="returnDescription"><p>[description]</p>
</td>
</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>
</div>
</div>
<div data-ice="methodDetails"><h2 data-ice="title">Public Methods</h2>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-addAvatar">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">addAvatar</span><span class="code" data-ice="signature">(divID: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>)</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber171">source</a></span></span>
</span>
</h3>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">divID</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"><ul><li>optional</li>
<li>default: #users</li></ul></td>
<td data-ice="description"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-addCursor">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">addCursor</span><span class="code" data-ice="signature">(range: <span>[{index: index,length: 0}]</span>)</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber209">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>addCursor add the cursor to the editor</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">range</td>
<td data-ice="type" class="code"><span>[{index: index,length: 0}]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[description]</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-capitalize">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">capitalize</span><span class="code" data-ice="signature">(s: <span>[string]</span>): <span>[string]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber104">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>capitalize uppercase the first letter</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">s</td>
<td data-ice="type" class="code"><span>[string]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[string]</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>[string]</span></td>
<td class="return-desc" data-ice="returnDescription"><p>[String the first letter is in uppercase]</p>
</td>
</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-checkIfOutdated">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">checkIfOutdated</span><span class="code" data-ice="signature">()</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber147">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>checkIfOutdated check if the user is outdated and if it is the case remove its caret and avatar </p>
</div>
<div data-ice="properties">
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-getAvatar">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">getAvatar</span><span class="code" data-ice="signature">(): <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber182">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>getAvatar return the div that contains this user id</p>
</div>
<div data-ice="properties">
</div>
<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>[type]</span></td>
<td class="return-desc" data-ice="returnDescription"><p>[description]</p>
</td>
</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-getColor">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">getColor</span><span class="code" data-ice="signature">(str: <span>[string]</span>): <span>[(r,g,b))]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber114">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>getColor for a specific id, get a unique color</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">str</td>
<td data-ice="type" class="code"><span>[string]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[the id of the user]</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>[(r,g,b))]</span></td>
<td class="return-desc" data-ice="returnDescription"><p>[the corresponding rgb color]</p>
</td>
</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-removeAvatar">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">removeAvatar</span><span class="code" data-ice="signature">(): <span>[type]</span></span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber190">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>removeAvatar remove the avatar of the user from the interface</p>
</div>
<div data-ice="properties">
</div>
<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>[type]</span></td>
<td class="return-desc" data-ice="returnDescription"><p>[description]</p>
</td>
</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-setPseudo">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">setPseudo</span><span class="code" data-ice="signature">(Pseudo: <span>[type]</span>)</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber200">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>setPseudo set pseudo for the user</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">Pseudo</td>
<td data-ice="type" class="code"><span>[type]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[description]</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-update">
<span class="access" data-ice="access">public</span>
<span class="code" data-ice="name">update</span><span class="code" data-ice="signature">(range: <span>[{index: index,length: 0}]</span>, cursor: <span>[boolean]</span>)</span>
<span class="right-info">
<span data-ice="source"><span><a href="file/view/marker.js.html#lineNumber126">source</a></span></span>
</span>
</h3>
<div data-ice="description"><p>update the time to keep the avatar and cursor if it exist</p>
</div>
<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">range</td>
<td data-ice="type" class="code"><span>[{index: index,length: 0}]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[description]</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">cursor</td>
<td data-ice="type" class="code"><span>[boolean]</span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>[if it is true add update the caret position]</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.0.4)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>
<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>