fix(ui): konva caching opt-out doesn't do what i thought it would

This commit is contained in:
psychedelicious
2025-08-28 20:18:07 +10:00
parent 144c54a6c8
commit a2b6536078

View File

@@ -216,11 +216,8 @@ export class CanvasEntityObjectRenderer extends CanvasModuleBase {
// We should also never cache if the entity has no dimensions. Konva will log an error to console like this:
// Konva error: Can not cache the node. Width or height of the node equals 0. Caching is skipped.
//
// It won't raise - just logs the error.
const hasContent = this.konva.objectGroup.width() > 0 && this.konva.objectGroup.height() > 0;
if (hasContent && isVisible && (force || !isCached)) {
if (isVisible && (force || !isCached)) {
this.log.trace('Caching object group');
this.konva.objectGroup.clearCache();
this.konva.objectGroup.cache({ pixelRatio: 1, imageSmoothingEnabled: false });