mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix canvas cache property access
This commit is contained in:
parent
143ce7f00b
commit
21ed6bccd8
@ -497,7 +497,7 @@ export class CanvasObjectRenderer {
|
|||||||
const { rect, replaceObjects, attrs } = { replaceObjects: false, attrs: {}, ...options };
|
const { rect, replaceObjects, attrs } = { replaceObjects: false, attrs: {}, ...options };
|
||||||
let imageDTO: ImageDTO | null = null;
|
let imageDTO: ImageDTO | null = null;
|
||||||
const hash = this.parent.hash({ rect, attrs });
|
const hash = this.parent.hash({ rect, attrs });
|
||||||
const cachedImageName = this.manager.imageNameCache.get(hash);
|
const cachedImageName = this.manager.cache.imageNameCache.get(hash);
|
||||||
|
|
||||||
if (cachedImageName) {
|
if (cachedImageName) {
|
||||||
imageDTO = await getImageDTO(cachedImageName);
|
imageDTO = await getImageDTO(cachedImageName);
|
||||||
@ -525,7 +525,7 @@ export class CanvasObjectRenderer {
|
|||||||
rect: { x: Math.round(rect.x), y: Math.round(rect.y), width: imageDTO.width, height: imageDTO.height },
|
rect: { x: Math.round(rect.x), y: Math.round(rect.y), width: imageDTO.width, height: imageDTO.height },
|
||||||
replaceObjects,
|
replaceObjects,
|
||||||
});
|
});
|
||||||
this.manager.imageNameCache.set(hash, imageDTO.image_name);
|
this.manager.cache.imageNameCache.set(hash, imageDTO.image_name);
|
||||||
|
|
||||||
return imageDTO;
|
return imageDTO;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user