From 7f196778d3d3c3b28d51547fa0ac14161ad5b4fd Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Thu, 15 Mar 2018 11:56:44 -0400 Subject: [PATCH] [plotly.js] add icon interface --- types/plotly.js/index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 48d0eb0055..9fbbeaa92f 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -297,6 +297,13 @@ export type ModeBarDefaultButtons = 'lasso2d' | 'select2d' | 'sendDataToCloud' | export type ButtonClickEvent = (gd: PlotlyHTMLElement, ev: MouseEvent) => void; +export interface Icon { + width: number; + path: string; + ascent: number; + descent: number; +} + export interface ModeBarButton { /** name / id of the buttons (for tracking) */ name: string; @@ -311,7 +318,7 @@ export interface ModeBarButton { * svg icon object associated with the button * can be linked to Plotly.Icons to use the default plotly icons */ - icon: string; + icon: string | Icon; /** icon positioning */ gravity?: string;