From 58737b0244e18bff56cb34aaff348dde26c0c1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20M=C3=A9sz=C3=A1ros=2C=20Ph=2ED?= Date: Tue, 17 May 2022 09:19:49 +0200 Subject: [PATCH] align with the spec: no implicit ids (#808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mészáros Gergely --- modules/ui/general.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ui/general.js b/modules/ui/general.js index 357d9a57..f56a234d 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -202,10 +202,10 @@ function showMapTooltip(point, e, i, g) { const province = pack.cells.province[i]; const prov = province ? pack.provinces[province].fullName + ", " : ""; tip(prov + stateName); - if (statesEditor?.offsetParent) highlightEditorLine(statesEditor, state); - if (diplomacyEditor?.offsetParent) highlightEditorLine(diplomacyEditor, state); - if (militaryOverview?.offsetParent) highlightEditorLine(militaryOverview, state); - if (provincesEditor?.offsetParent) highlightEditorLine(provincesEditor, province); + if (document.getElementById('statesEditor')?.offsetParent) highlightEditorLine(statesEditor, state); + if (document.getElementById('diplomacyEditor')?.offsetParent) highlightEditorLine(diplomacyEditor, state); + if (document.getElementById('militaryOverview')?.offsetParent) highlightEditorLine(militaryOverview, state); + if (document.getElementById('provincesEditor')?.offsetParent) highlightEditorLine(provincesEditor, province); } else if (layerIsOn("toggleCultures") && pack.cells.culture[i]) { const culture = pack.cells.culture[i]; tip("Culture: " + pack.cultures[culture].name);