Namespace: Rect

Properties

bottom

number

left

number

number

top

number

Methods

contains

contains(x, y) returns boolean

Tests whether this rectangle contains a x/y coordinate.

Parameter

x

number

The x coordinate to test for containment.

y

number

The y coordinate to test for containment.

Returns

boolean Whether this rectangle contains given coordinate.

intersects

intersects(other) returns boolean

Tests whether this rectangle intersects the provided rectangle. Assumes that the coordinate system increases going down and left.

Parameter

other

Blockly.utils.Rect

The other rectangle to check for intersection with.

Value must not be null.

Returns

boolean Whether this rectangle intersects the provided rectangle.