Enable/disable seedField when updating randomSeedField.checked

This commit is contained in:
Marc-Andre Ferland 2022-11-03 03:03:50 -04:00
parent 8a0a22bfb0
commit 5a18144366

View File

@ -41,9 +41,11 @@ const TASK_MAPPING = {
setUI: (seed) => {
if (!seed) {
randomSeedField.checked = true
seedField.disabled = true
return
}
randomSeedField.checked = false
seedField.disabled = false
seedField.value = seed
},
readUI: () => (randomSeedField.checked ? Math.floor(Math.random() * 10000000) : parseInt(seedField.value)),