Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,23 @@
let printText = document.getElementById("printText");
printText.classList.remove("show");
}

function hideErrorText() {
let errorText = document.getElementById("errorText");
errorText.classList.remove("show");
hideArrows(); // This function is declared in js/activity.js
}

document.addEventListener("click", function (event) {
let printText = document.getElementById("printText");
let errorText = document.getElementById("errorText");

if (printText && printText.classList.contains("show") && !printText.contains(event.target)) {
hidePrintText();
}
if (errorText && errorText.classList.contains("show") && !errorText.contains(event.target)) {
hideErrorText();
}
});
</script>

<div id ="canvasContainer">
Expand Down