()
| 329 | } |
| 330 | |
| 331 | function 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 | |
| 355 | function initializeAdvancedSettings({ neuralScene, digitCanvas, onConnectionsSettingsChange } = {}) { |
| 356 | const button = document.getElementById("advancedSettingsButton"); |
no test coverage detected