Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
KaliedaRik committed Apr 27, 2023
1 parent 43efa1f commit 2579cad
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 408 deletions.
2 changes: 1 addition & 1 deletion docs/demo/snippets/before-after-slider-infographic.html
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ <h5 id="the-exported-function">The exported function</h5>

</div>

<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">const</span> navItems = <span class="hljs-title function_">getNavigationData</span>(element.<span class="hljs-title function_">querySelector</span>(<span class="hljs-string">&#x27;:scope &gt; nav&#x27;</span>));</pre></div></div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">const</span> navItems = <span class="hljs-title function_">getNavigationData</span>(element.<span class="hljs-title function_">querySelector</span>(<span class="hljs-string">&#x27;:scope &gt; nav&#x27;</span>), {});</pre></div></div>

</li>

Expand Down
68 changes: 12 additions & 56 deletions docs/source/core/user-interaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -1278,53 +1278,9 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
}
};

<span class="hljs-keyword">const</span> updatePhraseEntitys = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {</pre></div></div>

</li>


<li id="section-32">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-32">&#x00a7;</a>
</div>
<p>for (const [name, ent] of _entries(library.entity)) {</p>

</div>

</li>


<li id="section-33">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-33">&#x00a7;</a>
</div>
<pre><code><span class="hljs-keyword">if</span> (ent.<span class="hljs-property">type</span> == <span class="hljs-variable constant_">T_PHRASE</span>) {
</code></pre>

</div>

</li>


<li id="section-34">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-34">&#x00a7;</a>
</div>
<pre><code> ent.<span class="hljs-property">dirtyDimensions</span> = <span class="hljs-literal">true</span>;
ent.<span class="hljs-property">dirtyFont</span> = <span class="hljs-literal">true</span>;
}
</code></pre>
<p>}</p>
<span class="hljs-keyword">const</span> updatePhraseEntitys = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {

</div>

<div class="content"><div class='highlight'><pre> <span class="hljs-title function_">_values</span>(library.<span class="hljs-property">entity</span>).<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">ent</span> =&gt;</span> {
<span class="hljs-title function_">_values</span>(library.<span class="hljs-property">entity</span>).<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">ent</span> =&gt;</span> {

<span class="hljs-keyword">if</span> (ent.<span class="hljs-property">type</span> == <span class="hljs-variable constant_">T_PHRASE</span>) {

Expand All @@ -1337,11 +1293,11 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
</li>


<li id="section-35">
<li id="section-32">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-35">&#x00a7;</a>
<a class="ss" href="#section-32">&#x00a7;</a>
</div>
<p>Internal functions that get triggered when setting a DOM-based artefact’s <code>trackHere</code> attribute. They add/remove an event listener to the artefact’s domElement.</p>

Expand Down Expand Up @@ -1382,11 +1338,11 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
</li>


<li id="section-36">
<li id="section-33">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-36">&#x00a7;</a>
<a class="ss" href="#section-33">&#x00a7;</a>
</div>
<p>Animation object which checks whether any window event listeners have fired, and actions accordingly</p>

Expand Down Expand Up @@ -1438,11 +1394,11 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
</li>


<li id="section-37">
<li id="section-34">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-37">&#x00a7;</a>
<a class="ss" href="#section-34">&#x00a7;</a>
</div>
<p><code>Exported functions</code> (to modules and the scrawl object). Event listeners can be a drain on web page efficiency. If a web page contains only static canvas (and/or stack) displays, with no requirement for user interaction, we can minimize Scrawl-canvas’s impact on those pages by switching off the core listeners (and also the core animation loop).</p>

Expand Down Expand Up @@ -1470,11 +1426,11 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
</li>


<li id="section-38">
<li id="section-35">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-38">&#x00a7;</a>
<a class="ss" href="#section-35">&#x00a7;</a>
</div>
<p>Helper function</p>

Expand Down Expand Up @@ -1511,11 +1467,11 @@ <h2 id="cascade-interaction-results-down-to-subscribed-elements">Cascade interac
</li>


<li id="section-39">
<li id="section-36">
<div class="annotation">

<div class="sswrap ">
<a class="ss" href="#section-39">&#x00a7;</a>
<a class="ss" href="#section-36">&#x00a7;</a>
</div>
<p><code>Exported functions</code> (to modules). Invoke the resize and/or scroll event listeners once, outside the regular requestAnimationFrame tick.</p>

Expand Down
Loading

0 comments on commit 2579cad

Please sign in to comment.