diff --git a/en/numerics/FJMT.2024/index.md b/en/numerics/FJMT.2024/index.md index 102c72e..88ec5f4 100644 --- a/en/numerics/FJMT.2024/index.md +++ b/en/numerics/FJMT.2024/index.md @@ -16,6 +16,8 @@ math: true .manual_center_1500 { margin-left: -367px; margin-top: 1em; width: 1500px; height: 750px; } h3 { margin-top: 1em; margin-bottom: 0.5em; font-size: 110%; } p { margin-top: 1em; } +.form { display: flex; align-items: center; margin-bottom: 0.5em; } +.form input { margin-right: 1em; margin-left: 1em; }

$β$ distribution with $σ² = {{sigma}}$

@@ -56,6 +58,8 @@ Convergence rates are computed over the time span marked in blue in the first pl
1 + +
{:.manual_center_1500} @@ -68,16 +72,18 @@ Convergence rates are computed over the time span marked in blue in the first pl {% endfor %} ]; tags.forEach((tag) => { - console.log(tag); - console.log("slider_" + tag); const slider = document.getElementById("slider_" + tag); - console.log(slider); + const check = document.getElementById("check_" + tag); const img = document.getElementById("g_init_" + tag); const disp = document.getElementById("brightness_" + tag); - slider.addEventListener("input", (event) => { - new_value = event.target.value; - disp.textContent = new_value; - img.style.filter = `brightness(${new_value})` - }); + update = () => { + disp.textContent = slider.value; + const i_val = check.checked ? "100%" : "0%"; + const new_value = slider.value; + const new_filter_value = `brightness(${new_value}) invert(${i_val})` + img.style.filter = new_filter_value; + } + slider.addEventListener("input", update); + check.addEventListener("change", update); })