Skip to main content

flywave-map-controls.getwidthandheightfromcanvas

Home > @flywave/flywave-map-controls > getWidthAndHeightFromCanvas

getWidthAndHeightFromCanvas() function

Extracts the CSS width and height of the given canvas if available, or width and height of the canvas otherwise.

Signature:

export declare function getWidthAndHeightFromCanvas(canvas: HTMLCanvasElement): {
width: number;
height: number;
};

Parameters

Parameter

Type

Description

canvas

HTMLCanvasElement

The canvas.

Returns:



{ width: number; height: number; }