summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-30 22:07:44 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-30 22:07:44 +0200
commit19a76e9d6ea66024cb868977556baab69b3d881e (patch)
tree1253df88fb62a0ac2c5986b98288c7d05993eb68
parentdb7167fd0af6436d1b3bda740a4ca801a0502f84 (diff)
downloadplantagenet-19a76e9d6ea66024cb868977556baab69b3d881e.tar.gz
highlight vassal for action
-rw-r--r--play.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/play.js b/play.js
index 7d6eecc..1fb11b3 100644
--- a/play.js
+++ b/play.js
@@ -593,7 +593,7 @@ function build_map() {
e.style.backgroundSize = small + "px"
//e.style.transform = "rotate(315deg)"
e.style.zIndex = "-50"
- register_tooltip(e, data.seat[ix].name)
+ register_tooltip(e, data.lords[ix].short_name)
document.getElementById("pieces").appendChild(e)
})
@@ -635,14 +635,14 @@ function build_map() {
}
e = ui.vassal_cal[ix] = document.createElement("div")
- e.className = "hide unit vassal + vassal_" + vassal.name.toLowerCase()
+ e.className = "hide unit vassal vassal_" + vassal.name.toLowerCase()
e.style.position = "absolute"
register_action(e, "vassal", ix)
register_tooltip(e, data.vassals[ix].name)
document.getElementById("pieces").appendChild(e)
e = ui.vassal_mat[ix] = document.createElement("div")
- e.className = "unit vassal + vassal_" + vassal.name.toLowerCase()
+ e.className = "unit vassal vassal_" + vassal.name.toLowerCase()
register_action(e, "vassal", ix)
register_tooltip(e, data.vassals[ix].name)
})
@@ -851,6 +851,7 @@ function layout_calendar() {
function add_vassal(parent, vassal, lord, routed) {
let elt = ui.vassal_mat[vassal]
elt.classList.toggle("selected", view.vassal === vassal || set_has(view.vassal, vassal))
+ elt.classList.toggle("action", is_action("vassal", vassal))
parent.appendChild(elt)
}