tidy(ui): remove unused code, comments

This commit is contained in:
psychedelicious 2024-08-08 17:26:01 +10:00
parent 4668ea449b
commit d7e8f3d756
2 changed files with 1 additions and 7 deletions

View File

@ -2,7 +2,7 @@ import { logger } from 'app/logging/logger';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { deepClone } from 'common/util/deepClone'; import { deepClone } from 'common/util/deepClone';
import { parseify } from 'common/util/serialize'; import { parseify } from 'common/util/serialize';
import { $lastProgressEvent, sessionImageStaged } from 'features/controlLayers/store/canvasV2Slice'; import { sessionImageStaged } from 'features/controlLayers/store/canvasV2Slice';
import { boardIdSelected, galleryViewChanged, imageSelected, offsetChanged } from 'features/gallery/store/gallerySlice'; import { boardIdSelected, galleryViewChanged, imageSelected, offsetChanged } from 'features/gallery/store/gallerySlice';
import { $nodeExecutionStates, upsertExecutionState } from 'features/nodes/hooks/useExecutionState'; import { $nodeExecutionStates, upsertExecutionState } from 'features/nodes/hooks/useExecutionState';
import { zNodeStatus } from 'features/nodes/types/invocation'; import { zNodeStatus } from 'features/nodes/types/invocation';
@ -64,14 +64,10 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
const { offset_x, offset_y } = data.result; const { offset_x, offset_y } = data.result;
if (canvasV2.session.isStaging) { if (canvasV2.session.isStaging) {
dispatch(sessionImageStaged({ stagingAreaImage: { imageDTO, offsetX: offset_x, offsetY: offset_y } })); dispatch(sessionImageStaged({ stagingAreaImage: { imageDTO, offsetX: offset_x, offsetY: offset_y } }));
} else if (!canvasV2.session.isActive) {
$lastProgressEvent.set(null);
} }
} else if (data.result.type === 'image_output') { } else if (data.result.type === 'image_output') {
if (canvasV2.session.isStaging) { if (canvasV2.session.isStaging) {
dispatch(sessionImageStaged({ stagingAreaImage: { imageDTO, offsetX: 0, offsetY: 0 } })); dispatch(sessionImageStaged({ stagingAreaImage: { imageDTO, offsetX: 0, offsetY: 0 } }));
} else if (!canvasV2.session.isActive) {
$lastProgressEvent.set(null);
} }
} }
} }

View File

@ -77,7 +77,6 @@ export class CanvasProgressImage {
try { try {
this.imageElement = await loadImage(dataURL); this.imageElement = await loadImage(dataURL);
if (this.konva.image) { if (this.konva.image) {
console.log('UPDATING PROGRESS IMAGE')
this.konva.image.setAttrs({ this.konva.image.setAttrs({
image: this.imageElement, image: this.imageElement,
x, x,
@ -86,7 +85,6 @@ export class CanvasProgressImage {
height, height,
}); });
} else { } else {
console.log('CREATING NEW PROGRESS IMAGE')
this.konva.image = new Konva.Image({ this.konva.image = new Konva.Image({
name: CanvasProgressImage.IMAGE_NAME, name: CanvasProgressImage.IMAGE_NAME,
listening: false, listening: false,