Home > blockly > utils > Rect > from
utils.Rect.from() method
Converts a DOM or SVG Rect to a Blockly Rect.
Signature:
static from(rect: DOMRect | SVGRect): Rect;
Parameters
| Parameter | Type | Description |
|---|---|---|
| rect | DOMRect | SVGRect | The rectangle to convert. |
Returns:
A representation of the same rectangle as a Blockly Rect.