mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix reset logic
This commit is contained in:
parent
d9eab7f383
commit
754525be82
@ -61,7 +61,7 @@
|
||||
<input type="file" id="initimg" name="initimg" accept=".jpg, .jpeg, .png">
|
||||
<label title="Set to -1 for random seed" for="seed">Seed:</label>
|
||||
<input value="-1" type="number" id="seed" name="seed">
|
||||
<button type="button" id="reset">↺</button>
|
||||
<button type="button" id="reset-seed">↺</button>
|
||||
<span>•</span>
|
||||
<button type="button" id="reset-all">Reset to Defaults</button>
|
||||
<br>
|
||||
|
@ -47,8 +47,10 @@ function loadFields(form) {
|
||||
}
|
||||
|
||||
function clearFields(form) {
|
||||
localStorage.clear()
|
||||
location.reload()
|
||||
localStorage.clear();
|
||||
let prompt = form.prompt.value;
|
||||
form.reset();
|
||||
form.prompt.value = prompt;
|
||||
}
|
||||
|
||||
async function generateSubmit(form) {
|
||||
@ -116,7 +118,7 @@ window.onload = () => {
|
||||
document.querySelector("#generate-form").addEventListener('change', (e) => {
|
||||
saveFields(e.target.form);
|
||||
});
|
||||
document.querySelector("#reset").addEventListener('click', (e) => {
|
||||
document.querySelector("#reset-seed").addEventListener('click', (e) => {
|
||||
document.querySelector("#seed").value = -1;
|
||||
saveFields(e.target.form);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user