g6/packages/site/docs/apis/interfaces/behaviors/TrackCanvas3DOptions.en.md

73 lines
1.9 KiB
Markdown
Raw Normal View History

---
title: TrackCanvas3DOptions
---
[Overview - v5.0.0-alpha.9](../../README.en.md) / [Modules](../../modules.en.md) / [behaviors](../../modules/behaviors.en.md) / TrackCanvas3DOptions
[behaviors](../../modules/behaviors.en.md).TrackCanvas3DOptions
## Properties
### eventName
`Optional` **eventName**: `string`
The event name to trigger when drag end.
#### Defined in
[packages/g6/src/stdlib/behavior/track-canvas-3d.ts:24](https://github.com/antvis/G6/blob/a69acd5592/packages/g6/src/stdlib/behavior/track-canvas-3d.ts#L24)
___
### secondaryKey
`Optional` **secondaryKey**: `string`
The assistance secondary key to trigger the behavior.
If it is not assigned, triggered only by trigger.
You can also assigned it with a key on keyboard e.g. 'shift',
to make the behavior triggered only when the key is pressing and trigger is happening.
#### Defined in
[packages/g6/src/stdlib/behavior/track-canvas-3d.ts:20](https://github.com/antvis/G6/blob/a69acd5592/packages/g6/src/stdlib/behavior/track-canvas-3d.ts#L20)
___
### shouldBegin
`Optional` **shouldBegin**: (`event`: [`IG6GraphEvent`](IG6GraphEvent.en.md)) => `boolean`
#### Type declaration
▸ (`event`): `boolean`
Whether allow the behavior happen on the current item.
##### Parameters
| Name | Type |
| :------ | :------ |
| `event` | [`IG6GraphEvent`](IG6GraphEvent.en.md) |
##### Returns
`boolean`
#### Defined in
[packages/g6/src/stdlib/behavior/track-canvas-3d.ts:28](https://github.com/antvis/G6/blob/a69acd5592/packages/g6/src/stdlib/behavior/track-canvas-3d.ts#L28)
___
### trigger
`Optional` **trigger**: ``"drag"`` \| ``"directionKeys"``
The way to tranlate the canvas. 'drag' (default) means dragged by mouse, 'directionKeys' means the up/down/left/right key on keyBoard.
#### Defined in
[packages/g6/src/stdlib/behavior/track-canvas-3d.ts:13](https://github.com/antvis/G6/blob/a69acd5592/packages/g6/src/stdlib/behavior/track-canvas-3d.ts#L13)