Skip to main content

Function: svgResize()

function svgResize(workspace): void;

Defined in: packages/blockly/core/common.ts:199

Size the SVG image to completely fill its container. Call this when the view actually changes sizes (e.g. on a window resize/device orientation change). See workspace.resizeContents to resize the workspace when the contents change (e.g. when a block is added or removed). Record the height/width of the SVG image.

Parameters

ParameterTypeDescription
workspaceWorkspaceSvgAny workspace in the SVG.

Returns

void