From 3460591a20d2505a072dc99c405fb294c62016a2 Mon Sep 17 00:00:00 2001 From: dr-carlos Date: Thu, 14 Jan 2021 12:43:41 +1030 Subject: [PATCH 1/3] Display Build and Spell only if the build is calculated; fade in all objects on build calculate --- builder.js | 7 +++++-- display.js | 4 ++-- index.html | 10 +++++----- narrow.css | 32 ++++++++++++++++++++++++++++++++ wide.css | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 9 deletions(-) diff --git a/builder.js b/builder.js index 0e2b1bc..8e91be2 100644 --- a/builder.js +++ b/builder.js @@ -427,8 +427,11 @@ function calculateBuild(save_skp, skp){ } document.getElementById("level-choice").value = level; - for (let i of document.getElementsByClassName("hide-container")) { - i.style.visibility = "visible"; + for (let i of document.getElementsByClassName("hide-container-block")) { + i.style.display = "block"; + } + for (let i of document.getElementsByClassName("hide-container-grid")) { + i.style.display = "grid"; } console.log(equipment); diff --git a/display.js b/display.js index 93daf10..ea0e8a7 100644 --- a/display.js +++ b/display.js @@ -105,9 +105,9 @@ function displaySetBonuses(build, parent_id) { parent_div.append(set_summary_elem); if (build.activeSetCounts.size) { - parent_div.parentElement.style.visibility = "visible"; + parent_div.parentElement.style.display = "block"; } else { - parent_div.parentElement.style.visibility = "hidden"; + parent_div.parentElement.style.display = "none"; } for (const [setName, count] of build.activeSetCounts) { diff --git a/index.html b/index.html index 01bb154..60cb8f2 100644 --- a/index.html +++ b/index.html @@ -388,13 +388,13 @@ -