* Converts a DOM or SVG Rect to a Blockly Rect. * * @param rect The rectangle to convert. * @returns A representation of the same rectangle as a Blockly Rect.
(rect: DOMRect | SVGRect)
| 39 | * @returns A representation of the same rectangle as a Blockly Rect. |
| 40 | */ |
| 41 | static from(rect: DOMRect | SVGRect): Rect { |
| 42 | return new Rect(rect.y, rect.y + rect.height, rect.x, rect.x + rect.width); |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Creates a new copy of this rectangle. |
no outgoing calls
no test coverage detected