From 914c3a62bb2ae6d281ee6ee605cb6314a7c64d57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 17:35:50 +0000 Subject: [PATCH] Address review feedback: remove duplicate header, set width 600px, add reverse map-hover highlight Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --- public/index.css | 4 ++++ public/modules/dynamic/editors/states-editor.js | 3 +-- public/modules/ui/general.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/index.css b/public/index.css index ea78f087..c46fded9 100644 --- a/public/index.css +++ b/public/index.css @@ -1437,6 +1437,10 @@ div.states.hovered { background-image: linear-gradient(to right, #dedede 100%, #f2f2f2 50%, #fcfcfc 0%); } +#mergeStatesForm div[data-id].hovered { + background-image: linear-gradient(to right, #dedede 100%, #f2f2f2 50%, #fcfcfc 0%); +} + div.states > *, div.states sup, div.totalLine > div { diff --git a/public/modules/dynamic/editors/states-editor.js b/public/modules/dynamic/editors/states-editor.js index a514008a..30933c30 100644 --- a/public/modules/dynamic/editors/states-editor.js +++ b/public/modules/dynamic/editors/states-editor.js @@ -1301,7 +1301,6 @@ function openStateMergeDialog() { alertMessage.innerHTML = /* html */ `
-
Merge states

Check the checkbox next to each state you want to merge. Use the radio button to pick the ruling state that will absorb all others (its name, color, and capital will be kept). @@ -1349,7 +1348,7 @@ function openStateMergeDialog() { } $("#alert").dialog({ - width: fitContent(), + width: 600, title: `Merge states`, close: stateHighlightOff, buttons: { diff --git a/public/modules/ui/general.js b/public/modules/ui/general.js index ce285287..0610e2a6 100644 --- a/public/modules/ui/general.js +++ b/public/modules/ui/general.js @@ -238,6 +238,7 @@ function showMapTooltip(point, e, i, g) { if (document.getElementById("diplomacyEditor")?.offsetParent) highlightEditorLine(diplomacyEditor, state); if (document.getElementById("militaryOverview")?.offsetParent) highlightEditorLine(militaryOverview, state); if (document.getElementById("provincesEditor")?.offsetParent) highlightEditorLine(provincesEditor, province); + if (document.getElementById("mergeStatesForm")?.offsetParent) highlightEditorLine(byId("mergeStatesForm"), state); } else if (layerIsOn("toggleCultures") && pack.cells.culture[i]) { const culture = pack.cells.culture[i]; tip("Culture: " + pack.cultures[culture].name);