fix checkbox behaviour (remember checked)
This commit is contained in:
parent
1836c04310
commit
2f4ae7a4a2
2 changed files with 7 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
|
@ -92,10 +92,6 @@ function HKCheckCompletion(jsonObject) {
|
|||
// Prevents adding current percent data after each function call (each click of Analyze button)
|
||||
ResetCompletion(DIV_ID);
|
||||
|
||||
// Prevents wrong checkbox behaviour
|
||||
CheckboxHintsToggle("hide");
|
||||
CheckboxLocationsToggle("hide");
|
||||
|
||||
// Shallow Clone const objects (used for destructive functions)
|
||||
let HK_HINTS_temp = Object.assign({}, HK_HINTS);
|
||||
let HK_BOSSES_temp = Object.assign({}, HK_BOSSES);
|
||||
|
|
@ -264,6 +260,10 @@ function HKCheckCompletion(jsonObject) {
|
|||
|
||||
CompletionHTML(DIV_ID);
|
||||
|
||||
// Prevents wrong checkbox behaviour (must run after everything is finished)
|
||||
CheckboxHintsToggle();
|
||||
CheckboxLocationsToggle();
|
||||
|
||||
// finish and show benchmark
|
||||
benchHKCCEnd = new Date();
|
||||
console.info("HKCheckCompletion() time (ms) =", benchHKCCEnd - benchHKCCBegin);
|
||||
|
|
@ -921,7 +921,7 @@ function InitialHTMLPopulate(divIdObj) {
|
|||
* Toggles display of "hk-hints". On click with no parameters or on demand when called with a parameter
|
||||
* @param {string} param "hide", "show" or none (optional)
|
||||
*/
|
||||
function CheckboxHintsToggle(param) {
|
||||
function CheckboxHintsToggle(param = "none") {
|
||||
let checkboxId = document.getElementById("checkbox-hints");
|
||||
|
||||
switch (param) {
|
||||
|
|
@ -950,7 +950,7 @@ function CheckboxHintsToggle(param) {
|
|||
* Toggles display of ".location" class. On click with no parameters or on demand when called with a parameter
|
||||
* @param {string} param "hide", "show" or none (optional)
|
||||
*/
|
||||
function CheckboxLocationsToggle(param) {
|
||||
function CheckboxLocationsToggle(param = "none") {
|
||||
let checkboxId = document.getElementById("checkbox-locations");
|
||||
let allClassElements = document.querySelectorAll(".location");
|
||||
let length = allClassElements.length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue