mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): background rendering
This commit is contained in:
parent
7728ca6843
commit
662c5f4b77
@ -38,7 +38,7 @@ export class CanvasBackground {
|
||||
this.layer = new Konva.Layer({ listening: false });
|
||||
}
|
||||
|
||||
renderBackground() {
|
||||
render() {
|
||||
this.layer.zIndex(0);
|
||||
const scale = this.manager.stage.scaleX();
|
||||
const gridSpacing = getGridSpacing(scale);
|
||||
|
@ -464,7 +464,7 @@ export const setStageEventHandlers = (manager: KonvaNodeManager): (() => void) =
|
||||
stage.scaleY(newScale);
|
||||
stage.position(newPos);
|
||||
setStageAttrs({ ...newPos, width: stage.width(), height: stage.height(), scale: newScale });
|
||||
manager.preview.tool.render();
|
||||
manager.background.render();
|
||||
manager.preview.documentSizeOverlay.render();
|
||||
}
|
||||
}
|
||||
@ -480,7 +480,7 @@ export const setStageEventHandlers = (manager: KonvaNodeManager): (() => void) =
|
||||
height: stage.height(),
|
||||
scale: stage.scaleX(),
|
||||
});
|
||||
manager.preview.tool.render();
|
||||
manager.background.render();
|
||||
manager.preview.documentSizeOverlay.render();
|
||||
manager.preview.tool.render();
|
||||
});
|
||||
@ -521,8 +521,7 @@ export const setStageEventHandlers = (manager: KonvaNodeManager): (() => void) =
|
||||
setLastCursorPos(null);
|
||||
setLastMouseDownPos(null);
|
||||
manager.preview.documentSizeOverlay.fitToStage();
|
||||
manager.preview.tool.render();
|
||||
|
||||
manager.background.render();
|
||||
manager.preview.documentSizeOverlay.render();
|
||||
}
|
||||
manager.preview.tool.render();
|
||||
|
@ -199,7 +199,7 @@ export class KonvaNodeManager {
|
||||
height: this.stage.height(),
|
||||
scale: this.stage.scaleX(),
|
||||
});
|
||||
this.background.renderBackground();
|
||||
this.background.render();
|
||||
this.preview.documentSizeOverlay.render();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user