"git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "e1ae623f191832e39d61ecc85e396b74db100e90"
Unverified Commit 126b4050 authored by Dr.Lt.Data's avatar Dr.Lt.Data Committed by GitHub
Browse files

Crash fix for intermittent crashes that occur when opening MaskEditor. (#732)

parent 0764bb52
...@@ -314,11 +314,11 @@ class MaskEditorDialog extends ComfyDialog { ...@@ -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);
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment