fixed rm lvl's update legend bug
This commit is contained in:
parent
f448f28d01
commit
2c5dbc7c5f
4 changed files with 9 additions and 4 deletions
|
@ -44,6 +44,7 @@ $footer-font-size: 14px;
|
|||
|
||||
.details__item {
|
||||
margin: auto 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.details__link {
|
||||
|
|
|
@ -28,12 +28,14 @@
|
|||
|
||||
.taskbar__action {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
padding: 10px 0px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.taskbar__spacer {
|
||||
min-width: 250px;
|
||||
list-style: none;
|
||||
flex: 6;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
|
||||
.secondary-menu__item {
|
||||
margin: auto;
|
||||
list-style: none;
|
||||
padding: 20px 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -53,11 +53,12 @@ const updateLevelNumbersOnDOM = (id: number) => {
|
|||
}
|
||||
|
||||
// rename legend
|
||||
const legend = levelGroup.getElementsByTagName('legend')[0];
|
||||
const legendText = document.createTextNode(`Level ${newLevel}`);
|
||||
levelGroup.getElementsByTagName(
|
||||
'legend',
|
||||
)[0].appendChild(legendText);
|
||||
|
||||
const newLegend = document.createElement('legend');
|
||||
newLegend.className = legend.className;
|
||||
newLegend.appendChild(legendText);
|
||||
legend.replaceWith(newLegend);
|
||||
|
||||
// rename labels
|
||||
updateLabels(levelGroup, newLevel);
|
||||
|
|
Loading…
Reference in a new issue