fix: religions and cultures are not highlightable from editor

This commit is contained in:
Azgaar 2022-06-08 21:12:31 +03:00
parent 9215a01548
commit 182c6d558d
6 changed files with 30 additions and 26 deletions

View file

@ -229,9 +229,11 @@ function religionsEditorAddLines() {
byId("religionsFooterPopulation").dataset.population = totalPopulation;
// add listeners
$body.querySelectorAll("div.religions").forEach(el => el.on("mouseenter", religionHighlightOn));
$body.querySelectorAll("div.religions").forEach(el => el.on("mouseleave", religionHighlightOff));
$body.querySelectorAll("div.states").forEach(el => el.on("click", selectReligionOnLineClick));
$body.querySelectorAll(":scope > div").forEach($line => {
$line.on("mouseenter", religionHighlightOn);
$line.on("mouseleave", religionHighlightOff);
$line.on("click", selectReligionOnLineClick);
});
$body.querySelectorAll("fill-box").forEach(el => el.on("click", religionChangeColor));
$body.querySelectorAll("div > input.religionName").forEach(el => el.on("input", religionChangeName));
$body.querySelectorAll("div > select.religionType").forEach(el => el.on("change", religionChangeType));