Skip to content

Commit

Permalink
vecnatechnologies#396: Build change
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoung committed Jun 2, 2019
1 parent 0d17ca9 commit b4d3a69
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 42 deletions.
88 changes: 54 additions & 34 deletions docs/annotated/modules/templateRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ <h1>templateRenderer.js</h1>
</div>

<div class="content"><div class='highlight'><pre> currentAttributes = currentNode.attributes;
<span class="hljs-keyword">var</span> prevLength = currentAttributes.length;
<span class="hljs-keyword">while</span> (idx &lt; currentAttributes.length) {
currentAttr = currentAttributes[idx].name;
<span class="hljs-keyword">if</span> (newNode.getAttribute(currentAttr)) {
idx++;
} <span class="hljs-keyword">else</span> {
currentNode.removeAttribute(currentAttr);
}
}</pre></div></div>
<span class="hljs-keyword">if</span> (prevLength === currentAttributes.length) {</pre></div></div>

</li>

Expand All @@ -322,6 +322,26 @@ <h1>templateRenderer.js</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>bail since we can’t remove the attribute.</p>

</div>

<div class="content"><div class='highlight'><pre> $currentNode.replaceWith(newNode);
<span class="hljs-keyword">return</span>;
}
prevLength = currentAttributes.length;
}
}</pre></div></div>

</li>


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

<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Set new attributes</p>

</div>
Expand All @@ -335,11 +355,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-5">
<li id="section-6">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Quick check to see if we need to bother comparing sub-levels</p>

Expand All @@ -352,11 +372,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-6">
<li id="section-7">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Include all child nodes, including text and comment nodes</p>

Expand All @@ -368,11 +388,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-7">
<li id="section-8">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>If the DOM lists are different sizes, perform a hard refresh</p>

Expand All @@ -386,11 +406,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-8">
<li id="section-9">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Perform a recursive hotswap for all children nodes</p>

Expand Down Expand Up @@ -493,11 +513,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-9">
<li id="section-10">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>See above function declaration for method-level documentation</p>

Expand Down Expand Up @@ -539,11 +559,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-10">
<li id="section-11">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>range {IE selection object}
iCaretPos {Integer} will store the final caret position</p>
Expand All @@ -556,11 +576,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-11">
<li id="section-12">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>IE Support</p>

Expand All @@ -571,11 +591,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-12">
<li id="section-13">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Set focus on the element</p>

Expand All @@ -586,11 +606,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-13">
<li id="section-14">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>To get cursor position, get empty selection range</p>

Expand All @@ -601,11 +621,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-14">
<li id="section-15">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Move selection start to 0 position</p>

Expand All @@ -616,11 +636,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-15">
<li id="section-16">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>The caret position is selection length</p>

Expand All @@ -632,11 +652,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-16">
<li id="section-17">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Firefox support</p>

Expand All @@ -648,11 +668,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-17">
<li id="section-18">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Return results</p>

Expand All @@ -676,11 +696,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-18">
<li id="section-19">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>IE support</p>

Expand All @@ -694,11 +714,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-19">
<li id="section-20">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Firefox support</p>

Expand All @@ -711,11 +731,11 @@ <h1>templateRenderer.js</h1>
</li>


<li id="section-20">
<li id="section-21">
<div class="annotation">

<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>At least focus the element if nothing else</p>

Expand Down
14 changes: 7 additions & 7 deletions docs/api/templateRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h2>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line167">line 167</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line174">line 174</a>
</li></ul></dd>


Expand Down Expand Up @@ -168,7 +168,7 @@ <h4 class="name" id=".copyTopElement"><span class="type-signature">(static) </sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line237">line 237</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line244">line 244</a>
</li></ul></dd>


Expand Down Expand Up @@ -323,7 +323,7 @@ <h4 class="name" id=".getCaretPosition"><span class="type-signature">(static) </

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line261">line 261</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line268">line 268</a>
</li></ul></dd>


Expand Down Expand Up @@ -658,7 +658,7 @@ <h4 class="name" id=".hotswapKeepCaret"><span class="type-signature">(static) </

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line209">line 209</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line216">line 216</a>
</li></ul></dd>


Expand Down Expand Up @@ -837,7 +837,7 @@ <h4 class="name" id=".render"><span class="type-signature">(static) </span>rende

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line188">line 188</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line195">line 195</a>
</li></ul></dd>


Expand Down Expand Up @@ -1218,7 +1218,7 @@ <h4 class="name" id=".setCaretPosition"><span class="type-signature">(static) </

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line291">line 291</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line298">line 298</a>
</li></ul></dd>


Expand Down Expand Up @@ -1396,7 +1396,7 @@ <h4 class="name" id=".supportsSelection"><span class="type-signature">(static) <

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line251">line 251</a>
<a href="templateRenderer.js.html">templateRenderer.js</a>, <a href="templateRenderer.js.html#line258">line 258</a>
</li></ul></dd>


Expand Down
7 changes: 7 additions & 0 deletions docs/api/templateRenderer.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,19 @@ <h1 class="page-title">templateRenderer.js</h1>
// This is necessary, because some types of attributes cannot be removed
// without causing a browser error.
currentAttributes = currentNode.attributes;
var prevLength = currentAttributes.length;
while (idx &lt; currentAttributes.length) {
currentAttr = currentAttributes[idx].name;
if (newNode.getAttribute(currentAttr)) {
idx++;
} else {
currentNode.removeAttribute(currentAttr);
if (prevLength === currentAttributes.length) {
// bail since we can't remove the attribute.
$currentNode.replaceWith(newNode);
return;
}
prevLength = currentAttributes.length;
}
}

Expand Down
7 changes: 7 additions & 0 deletions torso-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,19 @@
// This is necessary, because some types of attributes cannot be removed
// without causing a browser error.
currentAttributes = currentNode.attributes;
var prevLength = currentAttributes.length;
while (idx < currentAttributes.length) {
currentAttr = currentAttributes[idx].name;
if (newNode.getAttribute(currentAttr)) {
idx++;
} else {
currentNode.removeAttribute(currentAttr);
if (prevLength === currentAttributes.length) {
// bail since we can't remove the attribute.
$currentNode.replaceWith(newNode);
return;
}
prevLength = currentAttributes.length;
}
}

Expand Down
2 changes: 1 addition & 1 deletion torso-bundle.min.js

Large diffs are not rendered by default.

0 comments on commit b4d3a69

Please sign in to comment.