mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): handle opacity for masks
This commit is contained in:
parent
f7b3df9583
commit
19434e73b4
@ -60,7 +60,7 @@ export class CanvasMaskAdapter {
|
|||||||
* Get this entity's entity identifier
|
* Get this entity's entity identifier
|
||||||
*/
|
*/
|
||||||
getEntityIdentifier = (): CanvasEntityIdentifier => {
|
getEntityIdentifier = (): CanvasEntityIdentifier => {
|
||||||
return getEntityIdentifier(this.state)
|
return getEntityIdentifier(this.state);
|
||||||
};
|
};
|
||||||
|
|
||||||
destroy = (): void => {
|
destroy = (): void => {
|
||||||
@ -84,7 +84,7 @@ export class CanvasMaskAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.log.debug('Updating');
|
this.log.debug('Updating');
|
||||||
const { position, objects, isEnabled } = state;
|
const { position, objects, isEnabled, opacity } = state;
|
||||||
|
|
||||||
if (this.isFirstRender || objects !== this.state.objects) {
|
if (this.isFirstRender || objects !== this.state.objects) {
|
||||||
await this.updateObjects({ objects });
|
await this.updateObjects({ objects });
|
||||||
@ -92,9 +92,9 @@ export class CanvasMaskAdapter {
|
|||||||
if (this.isFirstRender || position !== this.state.position) {
|
if (this.isFirstRender || position !== this.state.position) {
|
||||||
this.transformer.updatePosition({ position });
|
this.transformer.updatePosition({ position });
|
||||||
}
|
}
|
||||||
// if (this.isFirstRender || opacity !== this.state.opacity) {
|
if (this.isFirstRender || opacity !== this.state.opacity) {
|
||||||
// await this.updateOpacity({ opacity });
|
this.renderer.updateOpacity(opacity);
|
||||||
// }
|
}
|
||||||
if (this.isFirstRender || isEnabled !== this.state.isEnabled) {
|
if (this.isFirstRender || isEnabled !== this.state.isEnabled) {
|
||||||
this.updateVisibility({ isEnabled });
|
this.updateVisibility({ isEnabled });
|
||||||
}
|
}
|
||||||
@ -107,8 +107,6 @@ export class CanvasMaskAdapter {
|
|||||||
this.renderer.updateCompositingRectSize();
|
this.renderer.updateCompositingRectSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.transformer.syncInteractionState();
|
|
||||||
|
|
||||||
if (this.isFirstRender) {
|
if (this.isFirstRender) {
|
||||||
this.transformer.updateBbox();
|
this.transformer.updateBbox();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user