From 42d1a0f32e5a476033bda0329198bc661164ee6f Mon Sep 17 00:00:00 2001 From: Victor Marin <36818606+mdvictor@users.noreply.github.com> Date: Mon, 29 Nov 2021 19:27:56 +0200 Subject: [PATCH] TooltipPlugin: Remove other panels' shared tooltip in edit panel (#42187) --- public/app/plugins/panel/graph/graph_tooltip.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/app/plugins/panel/graph/graph_tooltip.ts b/public/app/plugins/panel/graph/graph_tooltip.ts index b1281eb6588..fcdef4e8078 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.ts +++ b/public/app/plugins/panel/graph/graph_tooltip.ts @@ -166,11 +166,13 @@ export default function GraphTooltip(this: any, elem: any, dashboard: any, scope self.show(pos, item); // broadcast to other graph panels that we are hovering! - pos.panelRelY = (pos.pageY - elem.offset().top) / elem.height(); - hoverEvent.payload.pos = pos; - hoverEvent.payload.panel = panel; - hoverEvent.payload.point['time'] = (pos as any).x; - dashboard.events.publish(hoverEvent); + if (!dashboard.panelInEdit) { + pos.panelRelY = (pos.pageY - elem.offset().top) / elem.height(); + hoverEvent.payload.pos = pos; + hoverEvent.payload.panel = panel; + hoverEvent.payload.point['time'] = (pos as any).x; + dashboard.events.publish(hoverEvent); + } }); elem.bind('plotclick', (event: any, pos: any, item: any) => {