Skip to content

Commit

Permalink
minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KaliedaRik committed Mar 19, 2023
1 parent bc497f8 commit 227468e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 47 deletions.
24 changes: 2 additions & 22 deletions demo/dom-004.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// [Run code](../../demo/dom-004.html)
import * as scrawl from '../source/scrawl.js'

import { reportSpeed, killTicker } from './utilities.js';
import { reportSpeed, killTicker, reportFullLibrary } from './utilities.js';


// #### Scene setup
Expand Down Expand Up @@ -69,27 +69,7 @@ let tween = scrawl.makeTween({

// #### Scene animation
// Function to display frames-per-second data, and other information relevant to the demo
const report = reportSpeed('#reportmessage', function () {

const lib = scrawl.library;

let t = Object.keys(lib.tween),
a = Object.keys(lib.artefact),
n = Object.keys(lib.animation),
k = Object.keys(lib.animationtickers),
e = Object.keys(lib.element),
tn = lib.tweennames.length,
an = lib.artefactnames.length,
nn = lib.animationnames.length,
kn = lib.animationtickersnames.length,
en = lib.elementnames.length;

return `Tween - ${t.length}, ${tn}: ${t.join(', ')}
Artefact - ${a.length}, ${an}: ${a.join(', ')}
Element - ${e.length}, ${en}: ${e.join(', ')}
Tickers - ${k.length}, ${kn}: ${k.join(', ')}
Animation - ${n.length}, ${nn}: ${n.join(', ')}`;
});
const report = reportSpeed('#reportmessage', () => reportFullLibrary(scrawl));


// Create the Display cycle animation
Expand Down
24 changes: 2 additions & 22 deletions docs/demo/dom-004.html
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ <h1 id="demo-dom-004">Demo DOM 004</h1>

<div class="content"><div class='highlight'><pre><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> scrawl <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;../source/scrawl.js&#x27;</span>

<span class="hljs-keyword">import</span> { reportSpeed, killTicker } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./utilities.js&#x27;</span>;</pre></div></div>
<span class="hljs-keyword">import</span> { reportSpeed, killTicker, reportFullLibrary } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./utilities.js&#x27;</span>;</pre></div></div>

</li>

Expand Down Expand Up @@ -1229,27 +1229,7 @@ <h4 id="scene-animation">Scene animation</h4>

</div>

<div class="content"><div class='highlight'><pre><span class="hljs-keyword">const</span> report = <span class="hljs-title function_">reportSpeed</span>(<span class="hljs-string">&#x27;#reportmessage&#x27;</span>, <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {

<span class="hljs-keyword">const</span> lib = scrawl.<span class="hljs-property">library</span>;

<span class="hljs-keyword">let</span> t = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(lib.<span class="hljs-property">tween</span>),
a = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(lib.<span class="hljs-property">artefact</span>),
n = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(lib.<span class="hljs-property">animation</span>),
k = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(lib.<span class="hljs-property">animationtickers</span>),
e = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">keys</span>(lib.<span class="hljs-property">element</span>),
tn = lib.<span class="hljs-property">tweennames</span>.<span class="hljs-property">length</span>,
an = lib.<span class="hljs-property">artefactnames</span>.<span class="hljs-property">length</span>,
nn = lib.<span class="hljs-property">animationnames</span>.<span class="hljs-property">length</span>,
kn = lib.<span class="hljs-property">animationtickersnames</span>.<span class="hljs-property">length</span>,
en = lib.<span class="hljs-property">elementnames</span>.<span class="hljs-property">length</span>;

<span class="hljs-keyword">return</span> <span class="hljs-string">`Tween - <span class="hljs-subst">${t.length}</span>, <span class="hljs-subst">${tn}</span>: <span class="hljs-subst">${t.join(<span class="hljs-string">&#x27;, &#x27;</span>)}</span>
Artefact - <span class="hljs-subst">${a.length}</span>, <span class="hljs-subst">${an}</span>: <span class="hljs-subst">${a.join(<span class="hljs-string">&#x27;, &#x27;</span>)}</span>
Element - <span class="hljs-subst">${e.length}</span>, <span class="hljs-subst">${en}</span>: <span class="hljs-subst">${e.join(<span class="hljs-string">&#x27;, &#x27;</span>)}</span>
Tickers - <span class="hljs-subst">${k.length}</span>, <span class="hljs-subst">${kn}</span>: <span class="hljs-subst">${k.join(<span class="hljs-string">&#x27;, &#x27;</span>)}</span>
Animation - <span class="hljs-subst">${n.length}</span>, <span class="hljs-subst">${nn}</span>: <span class="hljs-subst">${n.join(<span class="hljs-string">&#x27;, &#x27;</span>)}</span>`</span>;
});</pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">const</span> report = <span class="hljs-title function_">reportSpeed</span>(<span class="hljs-string">&#x27;#reportmessage&#x27;</span>, <span class="hljs-function">() =&gt;</span> <span class="hljs-title function_">reportFullLibrary</span>(scrawl));</pre></div></div>

</li>

Expand Down
3 changes: 2 additions & 1 deletion docs/source/mixin/cell-key-functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,10 @@ <h4 id="prototype-functions">Prototype functions</h4>
<div class="content"><div class='highlight'><pre> P.<span class="hljs-property">getEntityHits</span> = <span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) {

<span class="hljs-keyword">const</span> response = [],
results = [],
resultNames = [];

<span class="hljs-keyword">let</span> results = [];

<span class="hljs-keyword">if</span> (<span class="hljs-variable language_">this</span>.<span class="hljs-property">groupBuckets</span>) {

<span class="hljs-variable language_">this</span>.<span class="hljs-property">groupBuckets</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">grp</span> =&gt;</span> {
Expand Down
2 changes: 1 addition & 1 deletion min/scrawl.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion source/mixin/cell-key-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ export default function (P = Ωempty) {
P.getEntityHits = function () {

const response = [],
results = [],
resultNames = [];

let results = [];

if (this.groupBuckets) {

this.groupBuckets.forEach(grp => {
Expand Down

0 comments on commit 227468e

Please sign in to comment.