3.8 KiB
title |
---|
ToolbarConfig |
Overview - v5.0.0-alpha.9 / Modules / plugins / ToolbarConfig
plugins.ToolbarConfig
The ToolbarConfig
interface contains the following properties:
handleClick
: An optional function for handling clicks on the toolbar. It takes two arguments:code
(of type string) andgraph
(of type IGraph), and has no return value.getContent
: A required function for getting the content of the toolbar. It takes an optional argument of typeIGraph
, and returns a value of type HTMLDivElement or string.zoomSensitivity
: An optional number representing the zoom sensitivity of the toolbar. The default value is 10.minZoom
: An optional number representing the minimum zoom ratio of the toolbar. The default value is 0.00001.maxZoom
: An optional number representing the maximum zoom ratio of the toolbar. The default value is 1000.
Hierarchy
-
IPluginBaseConfig
↳
ToolbarConfig
Properties
className
• Optional
className: string
Inherited from
IPluginBaseConfig.className
Defined in
packages/g6/src/types/plugin.ts:6
container
• Optional
container: string
| HTMLDivElement
Inherited from
IPluginBaseConfig.container
Defined in
packages/g6/src/types/plugin.ts:5
getContent
• getContent: (graph?
: IGraph
<BehaviorRegistry
, ThemeRegistry
>) => string
| HTMLDivElement
Type declaration
▸ (graph?
): string
| HTMLDivElement
Function for getting content of toolbar
Parameters
Name | Type |
---|---|
graph? |
IGraph <BehaviorRegistry , ThemeRegistry > |
Returns
string
| HTMLDivElement
Defined in
packages/g6/src/stdlib/plugin/toolbar/index.ts:20
graph
• Optional
graph: IGraph
<BehaviorRegistry
, ThemeRegistry
>
Inherited from
IPluginBaseConfig.graph
Defined in
packages/g6/src/types/plugin.ts:7
handleClick
• Optional
handleClick: (code
: string
, graph
: IGraph
<BehaviorRegistry
, ThemeRegistry
>) => void
Type declaration
▸ (code
, graph
): void
Function for handling clicks on toolbar
Parameters
Name | Type |
---|---|
code |
string |
graph |
IGraph <BehaviorRegistry , ThemeRegistry > |
Returns
void
Defined in
packages/g6/src/stdlib/plugin/toolbar/index.ts:18
maxZoom
• maxZoom: number
Maximum zoom ratio of toolbar
Defined in
packages/g6/src/stdlib/plugin/toolbar/index.ts:26
minZoom
• minZoom: number
Minimum zoom ratio of toolbar
Defined in
packages/g6/src/stdlib/plugin/toolbar/index.ts:24
zoomSensitivity
• zoomSensitivity: number
Zoom sensitivity of toolbar