blockly > ScrollbarPair > resizeContent
ScrollbarPair.resizeContent() method
Recalculates the scrollbars' locations within their path and length. This should be called when the contents of the workspace have changed.
Signature:
resizeContent(hostMetrics: Metrics): void;
Parameters
Parameter |
Type |
Description |
hostMetrics |
Metrics |
A data structure describing all the required dimensions, possibly 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."],[[["`resizeContent()` recalculates the scrollbars' positions and size within the workspace."],["This method is called when the workspace content is modified, requiring scrollbar adjustments."],["It utilizes hostMetrics data for dimension calculations during the resizing process."]]],[]]