MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / initializeInfoDialog

Function initializeInfoDialog

assets/main.js:331–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329}
330
331function initializeInfoDialog() {
332 const infoButton = document.getElementById("infoButton");
333 const infoModal = document.getElementById("infoModal");
334 const closeButton = document.getElementById("closeInfoModal");
335 if (!infoModal) return;
336
337 const showModal = () => infoModal.classList.add("visible");
338 const hideModal = () => infoModal.classList.remove("visible");
339
340 infoButton?.addEventListener("click", showModal);
341 closeButton?.addEventListener("click", hideModal);
342 infoModal.addEventListener("click", (event) => {
343 if (event.target === infoModal) {
344 hideModal();
345 }
346 });
347
348 document.addEventListener("keydown", (event) => {
349 if (event.key === "Escape" && infoModal.classList.contains("visible")) {
350 hideModal();
351 }
352 });
353}
354
355function initializeAdvancedSettings({ neuralScene, digitCanvas, onConnectionsSettingsChange } = {}) {
356 const button = document.getElementById("advancedSettingsButton");

Callers 1

initializeVisualizerFunction · 0.85

Calls 1

hideModalFunction · 0.85

Tested by

no test coverage detected