From f03d36f58c13d7e1388ac78b032954bfd3b9e084 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Tue, 26 Jun 2018 10:45:03 -0400 Subject: [PATCH] [plotly.js] add plotly_clickannotation event --- types/plotly.js/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index d16a80818a..854960025d 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -74,11 +74,19 @@ export interface PlotRelayoutEvent { scene: PlotScene; } +export interface ClickAnnotationEvent { + index: number; + annotation: Annotations; + fullAnnotation: Annotations; + event: MouseEvent; +} + export interface PlotlyHTMLElement extends HTMLElement { on(event: 'plotly_click' | 'plotly_hover' | 'plotly_unhover', callback: (event: PlotMouseEvent) => void): void; on(event: 'plotly_selecting' | 'plotly_selected', callback: (event: PlotSelectionEvent) => void): void; on(event: 'plotly_restyle', callback: (data: PlotRestyleEvent) => void): void; on(event: 'plotly_relayout', callback: (event: PlotRelayoutEvent) => void): void; + on(event: 'plotly_clickannotation', callback: (event: ClickAnnotationEvent) => void): void; // on(event: 'plotly_event', callback: (data: any) => void): void; on(event: 'plotly_afterplot' | 'plotly_autosize' | 'plotly_deselect' | 'plotly_doubleclick' | 'plotly_redraw' | 'plotly_animated', callback: () => void): void; }