blockly > WorkspaceSvg > zoomCenter
WorkspaceSvg.zoomCenter() method
Zooming the blocks centered in the center of view with zooming in or out.
Signature:
zoomCenter(type: number): void;
Parameters
Parameter |
Type |
Description |
type |
number |
Type of zooming (-1 zooming out and 1 zooming in). |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `zoomCenter` method adjusts the zoom level of the Blockly workspace, centering the view."],["It accepts a `type` parameter, with -1 for zooming out and 1 for zooming in."],["This method does not return any value (void)."]]],[]]