Skip to content

Commit ce6ac59

Browse files
KIRRAWAclaude
andcommitted
Fix: add missing HTML IDs causing JS crash in pages 1, 3, 5
Root cause: <table> elements used class='truth-table'/'state-table' but JS referenced getElementById('truth-table')/'state-table') — returned null, crashed renderAll() before canvas animation or language event listeners could initialize. Fixes: - page1: added id='truth-table' to truth table element - page3: added id='state-table' to state table element - page5: added background to brain-region divs for visibility - All 6 pages verified: zero JS↔HTML ID mismatches, valid syntax Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 054ba6a commit ce6ac59

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

page1-logic-gates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2><span class="dot"></span> <span id="left-title">Logic Gate</span></h2>
123123
<span id="output-text" style="font-size:13px;color:var(--text-dim)">0</span>
124124
</div>
125125
</div>
126-
<table class="truth-table"><thead></thead><tbody></tbody></table>
126+
<table class="truth-table" id="truth-table"><thead></thead><tbody></tbody></table>
127127
</section>
128128

129129
<section class="panel">

page3-state-machines.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h2><span class="dot"></span> <span id="left-title">Sequential Logic — Flip-Fl
7676
<button class="ff-btn" data-ff="JK">JK Flip-Flop</button>
7777
</div>
7878
<div id="ff-diagram" style="display:flex;flex-direction:column;align-items:center;gap:14px;padding:8px 0"></div>
79-
<table class="state-table"><thead></thead><tbody></tbody></table>
79+
<table class="state-table" id="state-table"><thead></thead><tbody></tbody></table>
8080
</section>
8181

8282
<section class="panel">

page5-von-neumann.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
.bus-bar{flex:1;height:2px;background:var(--border);border-radius:1px}
3737
.bus-label{font-size:9px;color:var(--text-dim)}
3838
.brain-layout{position:relative;width:100%;height:390px}
39-
.brain-region{position:absolute;border:2px solid var(--border);border-radius:8px;padding:9px 12px;cursor:pointer;transition:all .3s;font-size:10px}
39+
.brain-region{position:absolute;border:2px solid var(--border);border-radius:8px;padding:9px 12px;cursor:pointer;transition:all .3s;font-size:10px;background:rgba(20,20,30,0.85)}
4040
.brain-region:hover{border-color:var(--accent)}
4141
.brain-region.highlight{border-color:var(--accent);box-shadow:0 0 16px var(--accent-glow);background:rgba(78,201,176,0.08)}
4242
.brain-region .rname{color:#ddd;font-weight:600;font-size:11px}

0 commit comments

Comments
 (0)