fix reset editable IDs
This commit is contained in:
parent
78317647db
commit
1c1964a814
1 changed files with 15 additions and 4 deletions
|
@ -534,6 +534,16 @@ function updateEditableIDs() {
|
|||
/* Resets all IDs in the edit IDs section to their "original" values.
|
||||
*/
|
||||
function resetEditableIDs() {
|
||||
if (player_build) {
|
||||
for (const id of editable_item_fields) {
|
||||
let edit_input = document.getElementById(id);
|
||||
let value_label = document.getElementById(id + "-base");
|
||||
|
||||
edit_input.value = value_label.value;
|
||||
edit_input.placeholder = value_label.value;
|
||||
}
|
||||
} else {
|
||||
//no player build, reset to 0
|
||||
for (const id of editable_item_fields) {
|
||||
let edit_input = document.getElementById(id);
|
||||
|
||||
|
@ -541,6 +551,7 @@ function resetEditableIDs() {
|
|||
edit_input.placeholder = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Updates all spell boosts
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue