forked from avi/signalelsewhere
Fix dead code removal, isolate panel close handlers, polish
This commit is contained in:
10
index.html
10
index.html
@@ -657,11 +657,6 @@ function cmdChoose(arg){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ── ENDING ──
|
// ── ENDING ──
|
||||||
function cmdChooseConfirmed(){
|
|
||||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
|
||||||
triggerEnding(G.faction);
|
|
||||||
}
|
|
||||||
|
|
||||||
function cmdMake(arg){
|
function cmdMake(arg){
|
||||||
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
||||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||||
@@ -857,9 +852,8 @@ function startSpectrum(){
|
|||||||
specAnimId=requestAnimationFrame(drawSpec);
|
specAnimId=requestAnimationFrame(drawSpec);
|
||||||
}
|
}
|
||||||
drawSpec();
|
drawSpec();
|
||||||
document.querySelectorAll('.panel-close').forEach(b=>{
|
const specClose = document.querySelector('#specPanel .panel-close');
|
||||||
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();};
|
if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── FACILITY MAP ──
|
// ── FACILITY MAP ──
|
||||||
|
|||||||
@@ -657,11 +657,6 @@ function cmdChoose(arg){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ── ENDING ──
|
// ── ENDING ──
|
||||||
function cmdChooseConfirmed(){
|
|
||||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
|
||||||
triggerEnding(G.faction);
|
|
||||||
}
|
|
||||||
|
|
||||||
function cmdMake(arg){
|
function cmdMake(arg){
|
||||||
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
if(!G.flags.readyForEnding){addLine('Not yet. Build, listen, decode, and choose first.','warn');return;}
|
||||||
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
if(!G.faction){addLine('Choose a path first with CHOOSE.','warn');return;}
|
||||||
@@ -857,9 +852,8 @@ function startSpectrum(){
|
|||||||
specAnimId=requestAnimationFrame(drawSpec);
|
specAnimId=requestAnimationFrame(drawSpec);
|
||||||
}
|
}
|
||||||
drawSpec();
|
drawSpec();
|
||||||
document.querySelectorAll('.panel-close').forEach(b=>{
|
const specClose = document.querySelector('#specPanel .panel-close');
|
||||||
b.onclick=()=>{if(specAnimId)cancelAnimationFrame(specAnimId);hidePanels();};
|
if(specClose) specClose.onclick = ()=>{ if(specAnimId) cancelAnimationFrame(specAnimId); hidePanels(); };
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── FACILITY MAP ──
|
// ── FACILITY MAP ──
|
||||||
|
|||||||
Reference in New Issue
Block a user