From 6ee89ad272bb17c5581efdc221e4e7d2d3dbe257 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Wed, 5 Feb 2020 10:00:05 -0500 Subject: [PATCH] Allow entity selection by clicking the bottom name --- macrovision.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macrovision.js b/macrovision.js index 68fb05b0..816f0f40 100644 --- a/macrovision.js +++ b/macrovision.js @@ -530,6 +530,8 @@ function displayEntity(entity, view, x, y) { bottomName.id = "bottom-name-" + entityIndex; bottomName.innerText = entity.name; + bottomName.addEventListener("click", () => select(box)); + world.appendChild(bottomName); entityIndex += 1;