g6/packages/site/docs/apis/behaviors/WIP-ZoomCanvasOptions.en.md

143 lines
3.7 KiB
Markdown
Raw Normal View History

---
title: ZoomCanvasOptions
---
[Overview - v5.0.0-beta.21](../../README.en.md) / [Modules](../../modules.en.md) / [behaviors](../../modules/behaviors.en.md) / ZoomCanvasOptions
[behaviors](../../modules/behaviors.en.md).ZoomCanvasOptions
## Properties
### enableOptimize
`Optional` **enableOptimize**: `boolean`
Whether enable optimize strategies, which will hide all the shapes excluding node keyShape while zooming.
TODO: optimize when trigger is upDownKeys
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:10](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L10)
2023-08-31 23:46:08 +08:00
---
### eventName
`Optional` **eventName**: `string`
The event name to trigger when zoom end.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:34](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L34)
2023-08-31 23:46:08 +08:00
---
### maxZoom
`Optional` **maxZoom**: `number`
The max value of zoom ratio to constrain the zoom-canvas-3d behavior
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:42](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L42)
2023-08-31 23:46:08 +08:00
---
### minZoom
`Optional` **minZoom**: `number`
The min value of zoom ratio to constrain the zoom-canvas-3d behavior
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:38](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L38)
2023-08-31 23:46:08 +08:00
---
### secondaryKey
`Optional` **secondaryKey**: `string`
The assistant secondary key on keyboard. If it is not assigned, the behavior will be triggered when trigger happens.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:22](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L22)
2023-08-31 23:46:08 +08:00
---
### sensitivity
`Optional` **sensitivity**: `number`
The sensitivity / speed of zooming.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:30](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L30)
2023-08-31 23:46:08 +08:00
---
### shouldBegin
`Optional` **shouldBegin**: (`event`: [`IG6GraphEvent`](IG6GraphEvent.en.md)) => `boolean`
#### Type declaration
▸ (`event`): `boolean`
Whether allow the behavior happen on the current item.
##### Parameters
2023-08-31 23:46:08 +08:00
| Name | Type |
| :------ | :------------------------------------- |
| `event` | [`IG6GraphEvent`](IG6GraphEvent.en.md) |
##### Returns
`boolean`
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:46](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L46)
2023-08-31 23:46:08 +08:00
---
### speedUpKey
`Optional` **speedUpKey**: `string`
The key on keyboard to speed up translating while pressing and zoom-canvas by direction keys. The trigger should be 'directionKeys' for this option.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:26](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L26)
2023-08-31 23:46:08 +08:00
---
### trigger
2023-08-31 23:46:08 +08:00
`Optional` **trigger**: `"wheel"` \| `"upDownKeys"`
The trigger for the behavior, 'wheel' by default. 'upDownKeys' means trigger this behavior by up / down keys on keyboard.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:18](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L18)
2023-08-31 23:46:08 +08:00
---
### triggerOnItems
`Optional` **triggerOnItems**: `boolean`
Whether allow trigger this behavior when wheeling start on nodes / edges / combos.
#### Defined in
2023-08-31 20:33:50 +08:00
[packages/g6/src/stdlib/behavior/zoom-canvas.ts:14](https://github.com/antvis/G6/blob/61e525e59b/packages/g6/src/stdlib/behavior/zoom-canvas.ts#L14)