mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-23 05:42:01 +01: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) {
|
||||
// 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)) {
|
||||
imageInpainter.setImg(task.reqBody.mask)
|
||||
}
|
||||
}, { once: true })
|
||||
initImagePreview.src = task.reqBody.init_image
|
||||
initImagePreview.dispatchEvent(new Event("load"))
|
||||
}
|
||||
}
|
||||
function readUI() {
|
||||
|
Loading…
Reference in New Issue
Block a user