From 7be8de044cd1ebeea849c48fd0557b60283b5cad Mon Sep 17 00:00:00 2001 From: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:07:45 -0800 Subject: [PATCH] Fix flicker --- public/app/features/canvas/runtime/element.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/app/features/canvas/runtime/element.tsx b/public/app/features/canvas/runtime/element.tsx index 7ec4d6b7418..f43d351281b 100644 --- a/public/app/features/canvas/runtime/element.tsx +++ b/public/app/features/canvas/runtime/element.tsx @@ -696,9 +696,16 @@ export class ElementState implements LayerElement { } updateData(ctx: DimensionContext) { + const previousData = this.data; + if (this.item.prepareData) { this.data = this.item.prepareData(ctx, this.options); - this.revId++; // rerender + + // Only increment revId if data actually changed (not just position) + // This prevents flickering when only position updates + if (JSON.stringify(this.data) !== JSON.stringify(previousData)) { + this.revId++; + } } // Update placement values from dimension context @@ -727,6 +734,9 @@ export class ElementState implements LayerElement { } } + // Apply updated positions without forcing a remount + this.applyLayoutStylesToDiv(); + const scene = this.getScene(); const frames = scene?.data?.series;