fix(ui): flash of last staged image when accepting staging area

Need to destroy the progress image and staging image when we finish with them.
This commit is contained in:
psychedelicious
2024-09-23 14:55:22 +10:00
committed by Kent Keirsey
parent 993a4603a1
commit 94cb611c90
2 changed files with 4 additions and 1 deletions

View File

@@ -109,6 +109,8 @@ export class CanvasProgressImageModule extends CanvasModuleBase {
if (!event || !showProgressOnCanvas) {
this.konva.group.visible(false);
this.konva.image?.destroy();
this.konva.image = null;
this.imageElement = null;
this.isLoading = false;
this.isError = false;

View File

@@ -100,7 +100,8 @@ export class CanvasStagingAreaModule extends CanvasModuleBase {
}
this.image.konva.group.visible(shouldShowStagedImage);
} else {
this.image?.konva.group.visible(false);
this.image?.destroy();
this.image = null;
}
};