Skip to content

Commit cdc4f47

Browse files
fix: anythingDrawn check
1 parent 80976dc commit cdc4f47

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/features/Overview/ShredsProgression/WebGl/chartUtils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export function draw(
184184
maxShreds,
185185
);
186186

187+
let anythingDrawn = false;
187188
const minDirtySlot = store.get(minDirtySlotByChartAtom).get(chartId);
188189
const tempEventPositions = new Map<
189190
Exclude<ShredEvent, ShredEvent.slot_complete>,
@@ -226,6 +227,9 @@ export function draw(
226227
visibleTsRange,
227228
});
228229
rectangleIdx += rectanglesAdded;
230+
if (rectanglesAdded) {
231+
anythingDrawn = true;
232+
}
229233
}
230234
updateSlotMeshCounts(slotMesh, rectangleIdx);
231235
}
@@ -244,8 +248,6 @@ export function draw(
244248
}
245249
}
246250

247-
const anythingDrawn = minDirtySlot != null;
248-
249251
if (forceDraw || anythingDrawn || cameraChanged) {
250252
rendererObj.renderer.render(rendererObj.scene, rendererObj.camera);
251253
}

0 commit comments

Comments
 (0)