1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Fix refresh bug in audio test

This commit is contained in:
kkapsner 2020-05-01 01:11:21 +02:00
parent 64adb49b81
commit 4fa91ef3ae
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,7 @@
<div id="test"> <div id="test">
Hashes: <table class="hashes"></table> Hashes: <table class="hashes"></table>
<br> <br>
Sums: <table class="sum"></table> Sums: <table class="sums"></table>
<button>refresh</button> <button>refresh</button>
</div> </div>
<script src="audioTest.js"></script> <script src="audioTest.js"></script>

View File

@ -13,6 +13,7 @@
const container = document.getElementById("test"); const container = document.getElementById("test");
const hashContainer = container.querySelector(".hashes"); const hashContainer = container.querySelector(".hashes");
const sumsContainer = container.querySelector(".sums");
let hashSets = Object.create(null); let hashSets = Object.create(null);
function createSet(set){ function createSet(set){
@ -144,7 +145,7 @@
sumRow.appendChild(nameCell); sumRow.appendChild(nameCell);
const sumCell = document.createElement("td"); const sumCell = document.createElement("td");
sumRow.appendChild(sumCell); sumRow.appendChild(sumCell);
container.querySelector(".sum").appendChild(sumRow); sumsContainer.appendChild(sumRow);
// Start audio processing // Start audio processing
context.startRendering(); context.startRendering();
@ -185,6 +186,7 @@
function createAllHashData(){ function createAllHashData(){
hashContainer.innerHTML = ""; hashContainer.innerHTML = "";
sumsContainer.innerHTML = "";
hashSets = Object.create(null); hashSets = Object.create(null);
createEmptyData(); createEmptyData();
createHashData(1e4); createHashData(1e4);