2023-08-30 19:46:37 +08:00
|
|
|
---
|
|
|
|
title: HoverActivateOptions
|
|
|
|
---
|
|
|
|
|
2023-10-11 20:33:18 +08:00
|
|
|
[Overview - v5.0.0-beta.21](../../README.en.md) / [Modules](../../modules.en.md) / [behaviors](../../modules/behaviors.en.md) / HoverActivateOptions
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[behaviors](../../modules/behaviors.en.md).HoverActivateOptions
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
## 属性
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
### activateState
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
• `可选` **activateState**: `string`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
selected 的状态,默认为 "selected"。
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 定义于
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[packages/g6/src/stdlib/behavior/hover-activate.ts:16](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/hover-activate.ts#L16)
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
---
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
### eventName
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
• `可选` **eventName**: `string`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
拖动结束时触发的事件名称。
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 定义于
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[packages/g6/src/stdlib/behavior/hover-activate.ts:26](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/hover-activate.ts#L26)
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
---
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
### itemTypes
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
• **itemTypes**: (`"node"` \| `"edge"` \| `"combo"`)[]
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
要激活的 item 类型。
|
|
|
|
默认为 ["node", "edge"]。
|
|
|
|
应为 "node"、"edge" 或 "combo" 的数组。
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 定义于
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[packages/g6/src/stdlib/behavior/hover-activate.ts:22](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/hover-activate.ts#L22)
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
---
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
### shouldBegin
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
• `可选` **shouldBegin**: (`event`: [`IG6GraphEvent`](IG6GraphEvent.en.md)) => `boolean`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 类型声明
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
▸ (`event`): `boolean`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
是否允许在当前项上进行操作。
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
##### 参数
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
| 名称 | 类型 |
|
|
|
|
| :------ | :------------------------------------- |
|
2023-08-31 21:59:28 +08:00
|
|
|
| `event` | [`IG6GraphEvent`](IG6GraphEvent.en.md) |
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
##### 返回值
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
`boolean`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 定义于
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[packages/g6/src/stdlib/behavior/hover-activate.ts:30](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/hover-activate.ts#L30)
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 23:46:08 +08:00
|
|
|
---
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
### throttle
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
• `可选` **throttle**: `number`
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
throttle 的间隔时间(以毫秒为单位),有助于避免频繁计算。 默认为 0。
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
#### 定义于
|
2023-08-30 19:46:37 +08:00
|
|
|
|
2023-08-31 21:59:28 +08:00
|
|
|
[packages/g6/src/stdlib/behavior/hover-activate.ts:11](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/hover-activate.ts#L11)
|