Undo spaces deletion causing weird display behavior

This commit is contained in:
hppeng 2022-08-10 17:15:47 -07:00
parent 0b92f69394
commit 5e4698de09

View file

@ -1207,7 +1207,7 @@ function generateTooltip(container, node_elem, ability, atree_map) {
} else { } else {
cost.innerHTML = reqYes; cost.innerHTML = reqYes;
} }
cost.innerHTML += "<span class = 'mc-gray'>Ability Points:</span>" + (maxAP - apUsed) + "<span class = 'mc-gray'>/" + ability.cost; cost.innerHTML += "<span class = 'mc-gray'>Ability Points:</span> " + (maxAP - apUsed) + "<span class = 'mc-gray'>/" + ability.cost;
container.appendChild(cost); container.appendChild(cost);
// archetype req // archetype req
@ -1218,7 +1218,7 @@ function generateTooltip(container, node_elem, ability, atree_map) {
} else { } else {
archReq.innerHTML = reqNo; archReq.innerHTML = reqNo;
} }
archReq.innerHTML += "<span class = 'mc-gray'>Min" + ability.archetype + " Archetype:</span> " + archChosen + "<span class = 'mc-gray'>/" + ability.archetype_req; archReq.innerHTML += "<span class = 'mc-gray'>Min " + ability.archetype + " Archetype:</span> " + archChosen + "<span class = 'mc-gray'>/" + ability.archetype_req;
container.appendChild(archReq); container.appendChild(archReq);
} }
@ -1230,14 +1230,14 @@ function generateTooltip(container, node_elem, ability, atree_map) {
} else { } else {
dependency.innerHTML = reqNo; dependency.innerHTML = reqNo;
} }
dependency.innerHTML += "<span class = 'mc-gray'>Required Ability:</span>" + atree_map.get(ability.dependencies[i]).ability.display_name; dependency.innerHTML += "<span class = 'mc-gray'>Required Ability:</span> " + atree_map.get(ability.dependencies[i]).ability.display_name;
container.appendChild(dependency); container.appendChild(dependency);
} }
// blockers // blockers
for (let i = 0; i < blockedBy.length; i++) { for (let i = 0; i < blockedBy.length; i++) {
let blocker = make_elem("p", ["scaled-font", "my-0", "mx-1"], {}); let blocker = make_elem("p", ["scaled-font", "my-0", "mx-1"], {});
blocker.innerHTML = reqNo + "<span class = 'mc-gray'>Blocked By:</span>" + blockedBy[i]; blocker.innerHTML = reqNo + "<span class = 'mc-gray'>Blocked By:</span> " + blockedBy[i];
container.appendChild(blocker); container.appendChild(blocker);
} }
} }