fix(ui): fix canvas cache property access

This commit is contained in:
psychedelicious 2024-08-22 14:43:23 +10:00
parent c54bc32ef6
commit 3539670d93

View File

@ -497,7 +497,7 @@ export class CanvasObjectRenderer {
const { rect, replaceObjects, attrs } = { replaceObjects: false, attrs: {}, ...options };
let imageDTO: ImageDTO | null = null;
const hash = this.parent.hash({ rect, attrs });
const cachedImageName = this.manager.imageNameCache.get(hash);
const cachedImageName = this.manager.cache.imageNameCache.get(hash);
if (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 },
replaceObjects,
});
this.manager.imageNameCache.set(hash, imageDTO.image_name);
this.manager.cache.imageNameCache.set(hash, imageDTO.image_name);
return imageDTO;
};