fixed rm lvl's update legend bug

This commit is contained in:
realaravinth 2021-05-30 12:18:27 +05:30
parent f448f28d01
commit 2c5dbc7c5f
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
4 changed files with 9 additions and 4 deletions

View file

@ -44,6 +44,7 @@ $footer-font-size: 14px;
.details__item { .details__item {
margin: auto 10px; margin: auto 10px;
list-style: none;
} }
.details__link { .details__link {

View file

@ -28,12 +28,14 @@
.taskbar__action { .taskbar__action {
display: inline-block; display: inline-block;
list-style: none;
padding: 10px 0px; padding: 10px 0px;
margin: auto; margin: auto;
} }
.taskbar__spacer { .taskbar__spacer {
min-width: 250px; min-width: 250px;
list-style: none;
flex: 6; flex: 6;
} }

View file

@ -62,6 +62,7 @@
.secondary-menu__item { .secondary-menu__item {
margin: auto; margin: auto;
list-style: none;
padding: 20px 25px; padding: 20px 25px;
display: flex; display: flex;
} }

View file

@ -53,11 +53,12 @@ const updateLevelNumbersOnDOM = (id: number) => {
} }
// rename legend // rename legend
const legend = levelGroup.getElementsByTagName('legend')[0];
const legendText = document.createTextNode(`Level ${newLevel}`); const legendText = document.createTextNode(`Level ${newLevel}`);
levelGroup.getElementsByTagName( const newLegend = document.createElement('legend');
'legend', newLegend.className = legend.className;
)[0].appendChild(legendText); newLegend.appendChild(legendText);
legend.replaceWith(newLegend);
// rename labels // rename labels
updateLabels(levelGroup, newLevel); updateLabels(levelGroup, newLevel);