mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): no objects rendered until vis toggled
This commit is contained in:
parent
e1cb30bbb4
commit
f4de2fd3b1
@ -117,6 +117,6 @@ export class CanvasInpaintMask {
|
||||
updateVisibility = (arg?: { isEnabled: boolean }) => {
|
||||
this.log.trace('Updating visibility');
|
||||
const isEnabled = get(arg, 'isEnabled', this.state.isEnabled);
|
||||
this.konva.layer.visible(isEnabled && this.renderer.hasObjects());
|
||||
this.konva.layer.visible(isEnabled);
|
||||
};
|
||||
}
|
||||
|
@ -70,6 +70,9 @@ export class CanvasLayer {
|
||||
this.log.debug('Updating');
|
||||
const { position, objects, opacity, isEnabled } = state;
|
||||
|
||||
if (this.isFirstRender || isEnabled !== this.state.isEnabled) {
|
||||
this.updateVisibility({ isEnabled });
|
||||
}
|
||||
if (this.isFirstRender || objects !== this.state.objects) {
|
||||
await this.updateObjects({ objects });
|
||||
}
|
||||
@ -79,9 +82,6 @@ export class CanvasLayer {
|
||||
if (this.isFirstRender || opacity !== this.state.opacity) {
|
||||
this.updateOpacity({ opacity });
|
||||
}
|
||||
if (this.isFirstRender || isEnabled !== this.state.isEnabled) {
|
||||
this.updateVisibility({ isEnabled });
|
||||
}
|
||||
// this.transformer.syncInteractionState();
|
||||
|
||||
if (this.isFirstRender) {
|
||||
@ -95,7 +95,7 @@ export class CanvasLayer {
|
||||
updateVisibility = (arg?: { isEnabled: boolean }) => {
|
||||
this.log.trace('Updating visibility');
|
||||
const isEnabled = get(arg, 'isEnabled', this.state.isEnabled);
|
||||
this.konva.layer.visible(isEnabled && this.renderer.hasObjects());
|
||||
this.konva.layer.visible(isEnabled);
|
||||
};
|
||||
|
||||
updateObjects = async (arg?: { objects: CanvasLayerState['objects'] }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user