feat(ui): temp disable doc size overlay

This commit is contained in:
psychedelicious 2024-07-05 19:14:09 +10:00
parent 4d3ee7e082
commit e66ef2e25e

View File

@ -1,6 +1,6 @@
import { getArbitraryBaseColor } from '@invoke-ai/ui-library'; import { getArbitraryBaseColor } from '@invoke-ai/ui-library';
import { DOCUMENT_FIT_PADDING_PX } from 'features/controlLayers/konva/constants';
import type { CanvasManager } from 'features/controlLayers/konva/CanvasManager'; import type { CanvasManager } from 'features/controlLayers/konva/CanvasManager';
import { DOCUMENT_FIT_PADDING_PX } from 'features/controlLayers/konva/constants';
import Konva from 'konva'; import Konva from 'konva';
export class CanvasDocumentSizeOverlay { export class CanvasDocumentSizeOverlay {
@ -31,28 +31,29 @@ export class CanvasDocumentSizeOverlay {
} }
render() { render() {
const document = this.manager.stateApi.getDocument(); return;
this.group.zIndex(0); // const document = this.manager.stateApi.getDocument();
// this.group.zIndex(0);
const x = this.manager.stage.x(); // const x = this.manager.stage.x();
const y = this.manager.stage.y(); // const y = this.manager.stage.y();
const width = this.manager.stage.width(); // const width = this.manager.stage.width();
const height = this.manager.stage.height(); // const height = this.manager.stage.height();
const scale = this.manager.stage.scaleX(); // const scale = this.manager.stage.scaleX();
this.outerRect.setAttrs({ // this.outerRect.setAttrs({
offsetX: x / scale, // offsetX: x / scale,
offsetY: y / scale, // offsetY: y / scale,
width: width / scale, // width: width / scale,
height: height / scale, // height: height / scale,
}); // });
this.innerRect.setAttrs({ // this.innerRect.setAttrs({
x: 0, // x: 0,
y: 0, // y: 0,
width: document.width, // width: document.width,
height: document.height, // height: document.height,
}); // });
} }
fitToStage() { fitToStage() {