const zoomPluginInstance = zoomPlugin(props?: ZoomPluginProps);
The `zoomPlugin()`
function takes an optional `ZoomPluginProps`
parameter that consists of the following property:
(? denotes an optional property)
Property | Type | Description | From |
---|
`enableShortcuts` ? | `boolean` | Enable shortcuts | 2.6.0 |
By default, users can use particular shortcuts to zoom in or zoom out the current document:
Shortcut | Action |
---|
`ctrl` + `+` | Zoom in the document |
`ctrl` + `-` | Zoom out the document |
`ctrl` + `0` | View the actual size of the document |
The plugin instance `zoomPluginInstance`
provides the following properties:
Property | Type | Description | From |
---|
`CurrentScale` | `ReactElement` | Show the current scale value | 2.0.0 |
`Zoom` | `ReactElement` | Customizable zoom button | 2.0.0 |
`ZoomIn` | `ReactElement` | Customizable zoom in button | 2.0.0 |
`ZoomInButton` | `ReactElement` | The default zoom in button | 2.0.0 |
`ZoomInMenuItem` | `ReactElement` | The default zoom in menu item | 2.5.0 |
`ZoomOut` | `ReactElement` | Customizable zoom out button | 2.0.0 |
`ZoomOutButton` | `ReactElement` | The default zoom out button | 2.0.0 |
`ZoomOutMenuItem` | `ReactElement` | The default zoom out menu item | 2.5.0 |
`ZoomPopover` | `ReactElement` | The default popover allows to zoom to specific level | 2.0.0 |
`zoomTo` | `Function` | Zoom to specific level | 2.4.0 |
See their usages in the examples below.