Skip to content

Commit 5538fc8

Browse files
fix(ui): konva caching opt-out doesn't do what i thought it would
1 parent faf8f0f commit 5538fc8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityObjectRenderer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,8 @@ export class CanvasEntityObjectRenderer extends CanvasModuleBase {
216216

217217
// We should also never cache if the entity has no dimensions. Konva will log an error to console like this:
218218
// Konva error: Can not cache the node. Width or height of the node equals 0. Caching is skipped.
219-
//
220-
// It won't raise - just logs the error.
221-
const hasContent = this.konva.objectGroup.width() > 0 && this.konva.objectGroup.height() > 0;
222219

223-
if (hasContent && isVisible && (force || !isCached)) {
220+
if (isVisible && (force || !isCached)) {
224221
this.log.trace('Caching object group');
225222
this.konva.objectGroup.clearCache();
226223
this.konva.objectGroup.cache({ pixelRatio: 1, imageSmoothingEnabled: false });

0 commit comments

Comments
 (0)