mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Zoom and Pan: simplify getElements (it's not actually async)
This commit is contained in:
parent
68cda4f213
commit
afbb0b5f86
@ -143,16 +143,10 @@ onUiLoaded(async() => {
|
||||
let mouseX, mouseY;
|
||||
let activeElement;
|
||||
|
||||
async function getElements() {
|
||||
const elements = await Promise.all(
|
||||
Object.values(elementIDs).map(id => gradioApp().querySelector(id))
|
||||
);
|
||||
return Object.fromEntries(
|
||||
Object.keys(elementIDs).map((key, index) => [key, elements[index]])
|
||||
);
|
||||
}
|
||||
|
||||
const elements = await getElements();
|
||||
const elements = Object.fromEntries(Object.keys(elementIDs).map((id) => [
|
||||
id,
|
||||
gradioApp().querySelector(elementIDs[id]),
|
||||
]));
|
||||
const elemData = {};
|
||||
|
||||
// Apply functionality to the range inputs. Restore redmask and correct for long images.
|
||||
|
Loading…
Reference in New Issue
Block a user