From 27d8ac206dce53ebe600c2cdc98ed6993368a898 Mon Sep 17 00:00:00 2001 From: Megan Riel-Mehan Date: Thu, 23 Aug 2018 11:26:47 -0700 Subject: [PATCH] updated selection interface to include selection description --- types/plotly.js/index.d.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 84cad93b48..3a5784ae21 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -49,10 +49,20 @@ export interface PlotCoordinate { pointNumber: number; } -export interface PlotSelectionEvent { - points: PlotCoordinate[]; +export interface SelectionDescription { + x: number[], + y: number[], } +export type PlotSelectedData = Partial; + +export interface PlotSelectionEvent { + points: PlotSelectedData[]; + range?: SelectionDescription; + lassoPoints?: SelectionDescription; +} + + export type PlotRestyleEvent = [ any, // update object -- attribute updated: new value number[] // array of traces updated