mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-25 20:08:16 +02:00
Applying changes from latest CR
- Replaced custom event with load event - Removed the custom event dispatch
This commit is contained in:
parent
f7193966fb
commit
21e3299b7a
@ -326,13 +326,12 @@ function restoreTaskToUI(task, fieldsToSkip) {
|
|||||||
}
|
}
|
||||||
else if (task.reqBody.init_image !== undefined) {
|
else if (task.reqBody.init_image !== undefined) {
|
||||||
// listen for inpainter loading event, which happens AFTER the main image loads (which reloads the inpainter)
|
// listen for inpainter loading event, which happens AFTER the main image loads (which reloads the inpainter)
|
||||||
document.addEventListener('imagePainterLoad', function() {
|
initImagePreview.addEventListener('load', function() {
|
||||||
if (Boolean(task.reqBody.mask)) {
|
if (Boolean(task.reqBody.mask)) {
|
||||||
imageInpainter.setImg(task.reqBody.mask)
|
imageInpainter.setImg(task.reqBody.mask)
|
||||||
}
|
}
|
||||||
}, { once: true })
|
}, { once: true })
|
||||||
initImagePreview.src = task.reqBody.init_image
|
initImagePreview.src = task.reqBody.init_image
|
||||||
initImagePreview.dispatchEvent(new Event("load"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function readUI() {
|
function readUI() {
|
||||||
|
Loading…
Reference in New Issue
Block a user