Connect TGO dialogs.

This commit is contained in:
Dan Albert
2021-05-13 00:56:35 -07:00
parent 1ab205cb46
commit dd75078019
2 changed files with 33 additions and 19 deletions

View File

@@ -168,6 +168,9 @@ function drawGroundObjects() {
game.groundObjects.forEach((tgo) => {
L.marker(tgo.position, { icon: iconFor(tgo.blue) })
.bindTooltip(`${tgo.name}<br />${tgo.units.join("<br />")}`)
.on("click", function () {
tgo.open_dialog();
})
.addTo(groundObjectsLayer);
drawSamThreatsAt(tgo);
});