show cap message when down_pct hits start capital limit
This commit is contained in:
2
ui.js
2
ui.js
@@ -304,10 +304,12 @@ const clamp_down_pct = () => {
|
||||
|
||||
const slider = document.getElementById('down_pct_slider');
|
||||
const num = document.getElementById('down_pct');
|
||||
const at_cap = +num.value >= max_pct - 0.05;
|
||||
if (+num.value > max_pct) {
|
||||
num.value = Math.round(max_pct * 10) / 10;
|
||||
slider.value = num.value;
|
||||
}
|
||||
document.getElementById('down_pct_cap').classList.toggle('visible', at_cap);
|
||||
};
|
||||
|
||||
// ===== Slider ↔ number sync =====
|
||||
|
||||
Reference in New Issue
Block a user