3.7 KiB
title |
---|
ZoomCanvasOptions |
Overview - v5.0.0-beta.21 / Modules / behaviors / ZoomCanvasOptions
behaviors.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
packages/g6/src/stdlib/behavior/zoom-canvas.ts:10
eventName
• Optional
eventName: string
The event name to trigger when zoom end.
Defined in
packages/g6/src/stdlib/behavior/zoom-canvas.ts:34
maxZoom
• Optional
maxZoom: number
The max value of zoom ratio to constrain the zoom-canvas-3d behavior
Defined in
packages/g6/src/stdlib/behavior/zoom-canvas.ts:42
minZoom
• Optional
minZoom: number
The min value of zoom ratio to constrain the zoom-canvas-3d behavior
Defined in
packages/g6/src/stdlib/behavior/zoom-canvas.ts:38
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
packages/g6/src/stdlib/behavior/zoom-canvas.ts:22
sensitivity
• Optional
sensitivity: number
The sensitivity / speed of zooming.
Defined in
packages/g6/src/stdlib/behavior/zoom-canvas.ts:30
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/zoom-canvas.ts:46
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
packages/g6/src/stdlib/behavior/zoom-canvas.ts:26
trigger
• 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
packages/g6/src/stdlib/behavior/zoom-canvas.ts:18
triggerOnItems
• Optional
triggerOnItems: boolean
Whether allow trigger this behavior when wheeling start on nodes / edges / combos.