diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasProgressImage.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasProgressImage.ts index 7d5df77400..64f16015b0 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasProgressImage.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasProgressImage.ts @@ -72,8 +72,8 @@ export class CanvasProgressImage { this.isLoading = true; - const { x, y } = this.manager.stateApi.getBbox().rect; - const { dataURL, width, height } = this.lastProgressEvent.progress_image; + const { x, y, width, height } = this.manager.stateApi.getBbox().rect; + const { dataURL } = this.lastProgressEvent.progress_image; try { this.imageElement = await loadImage(dataURL); if (this.konva.image) { diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingArea.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingArea.ts index be17df0404..81c134419c 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingArea.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingArea.ts @@ -43,17 +43,21 @@ export class CanvasStagingArea { render = async () => { const session = this.manager.stateApi.getSession(); - const { rect } = this.manager.stateApi.getBbox(); + const { x, y, width, height } = this.manager.stateApi.getBbox().rect; const shouldShowStagedImage = this.manager.stateApi.$shouldShowStagedImage.get(); this.selectedImage = session.stagedImages[session.selectedStagedImageIndex] ?? null; - this.konva.group.position({ x: rect.x, y: rect.y }); + this.konva.group.position({ x, y }); if (this.selectedImage) { - const { imageDTO, offsetX, offsetY } = this.selectedImage; + const { + imageDTO, + // offsetX, // TODO(psyche): restore the crop in the node? + // offsetY // TODO(psyche): restore the crop in the node? + } = this.selectedImage; if (!this.image) { - const { image_name, width, height } = imageDTO; + const { image_name } = imageDTO; this.image = new CanvasImageRenderer( { id: 'staging-area-image',