g6/packages/site/docs/apis/behaviors/WIP-HoverActivateOptions.en.md
2023-11-07 21:39:59 +08:00

2.1 KiB

title
HoverActivateOptions

Overview - v5.0.0-beta.21 / Modules / behaviors / HoverActivateOptions

behaviors.HoverActivateOptions

Properties

activateState

Optional activateState: string

The state name to be considered as "selected". Defaults to "selected".

Defined in

packages/g6/src/stdlib/behavior/hover-activate.ts:16


eventName

Optional eventName: string

The event name to trigger when drag end.

Defined in

packages/g6/src/stdlib/behavior/hover-activate.ts:26


itemTypes

itemTypes: ("node" | "edge" | "combo")[]

Item types to be able to acitvate. Defaults to ["node", "edge"]. Should be an array of "node", "edge", or "combo".

Defined in

packages/g6/src/stdlib/behavior/hover-activate.ts:22


shouldBegin

Optional shouldBegin: (event: IG6GraphEvent) => boolean

Type declaration

▸ (event): boolean

Whether allow the behavior happen on the current item.

Parameters
Name Type
event IG6GraphEvent
Returns

boolean

Defined in

packages/g6/src/stdlib/behavior/hover-activate.ts:30


throttle

Optional throttle: number

The time in milliseconds to throttle moving. Useful to avoid the frequent calculation. Defaults to 0.

Defined in

packages/g6/src/stdlib/behavior/hover-activate.ts:11