TooltipPlugin: Remove other panels' shared tooltip in edit panel (#42187)

pull/42480/head
Victor Marin 4 years ago committed by GitHub
parent 9c9e79da4f
commit 42d1a0f32e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      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) => {

Loading…
Cancel
Save