[plotly.js] add icon interface

This commit is contained in:
Jared Szechy
2018-03-15 11:56:44 -04:00
parent f24c811e08
commit 7f196778d3

View File

@@ -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;