blockly > Scrollbar > resize
Recalculate the scrollbar's location and its length.
Signature:
resize(opt_metrics?: Metrics): void;
Parameters
Parameter |
Type |
Description |
opt_metrics |
Metrics |
(Optional) A data structure of from the describing all the required dimensions. If not provided, it will be fetched from the host object. |
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 `Scrollbar.resize()` method recalculates the scrollbar's location and length within the workspace."],["It optionally accepts a `Metrics` object containing workspace dimensions for calculation, otherwise fetching them from the host object."],["Calling `resize()` ensures the scrollbar is visually and functionally updated to reflect the current state of the workspace."]]],[]]