mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Crash fix for intermittent crashes that occur when opening MaskEditor. (#732)
This commit is contained in:
parent
0764bb5218
commit
126b4050dc
@ -314,11 +314,11 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
imgCtx.drawImage(orig_image, 0, 0, drawWidth, drawHeight);
|
imgCtx.drawImage(orig_image, 0, 0, drawWidth, drawHeight);
|
||||||
|
|
||||||
// update mask
|
// update mask
|
||||||
backupCtx.drawImage(maskCanvas, 0, 0, maskCanvas.width, maskCanvas.height, 0, 0, backupCanvas.width, backupCanvas.height);
|
|
||||||
maskCanvas.width = drawWidth;
|
maskCanvas.width = drawWidth;
|
||||||
maskCanvas.height = drawHeight;
|
maskCanvas.height = drawHeight;
|
||||||
maskCanvas.style.top = imgCanvas.offsetTop + "px";
|
maskCanvas.style.top = imgCanvas.offsetTop + "px";
|
||||||
maskCanvas.style.left = imgCanvas.offsetLeft + "px";
|
maskCanvas.style.left = imgCanvas.offsetLeft + "px";
|
||||||
|
backupCtx.drawImage(maskCanvas, 0, 0, maskCanvas.width, maskCanvas.height, 0, 0, backupCanvas.width, backupCanvas.height);
|
||||||
maskCtx.drawImage(backupCanvas, 0, 0, backupCanvas.width, backupCanvas.height, 0, 0, maskCanvas.width, maskCanvas.height);
|
maskCtx.drawImage(backupCanvas, 0, 0, backupCanvas.width, backupCanvas.height, 0, 0, maskCanvas.width, maskCanvas.height);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user