Documentation
Reference
2.1.50 (current version)
collection
interactivityModel
Interfaces
2.1.52 (release candidate)
collection
interactivityModel
Interfaces

util.pixelBounds

Static object.

Methods

util.pixelBounds()

Methods

NameReturnsDescription
areIntersecting(bounds1, bounds2)

Boolean

Determines whether two rectangular areas intersect.

containsBounds(outer, inner)

Boolean

Determines whether a rectangular area completely contains another rectangular area.

containsPoint(bounds, point)

Boolean

Determines whether a rectangular area contains a point.

fromBounds(sourceBounds)

Number[][]

Calculates the rectangular area that everything passed falls inside of.

fromPoints(points)

Number[][]

Calculates the rectangular area that the passed points fall inside of.

getCenter(bounds)

Number[]

Calculates the center of the rectangular area.

getIntersection(bounds1, bounds2)

Number[][]|Null

Calculates the intersection of two rectangular areas.

getSize(bounds)

Number[]

Calculates the dimensions of a rectangular area.

Methods details

areIntersecting

{Boolean} areIntersecting(bounds1, bounds2)

Determines whether two rectangular areas intersect.

Returns intersection attribute.

Parameters:

ParameterDefault valueDescription
bounds1*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

First area.

bounds2*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

Second area.

* Mandatory parameter/option.

containsBounds

{Boolean} containsBounds(outer, inner)

Determines whether a rectangular area completely contains another rectangular area.

Returns inclusion attribute.

Parameters:

ParameterDefault valueDescription
outer*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

External area

inner*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

The area being checked.

* Mandatory parameter/option.

containsPoint

{Boolean} containsPoint(bounds, point)

Determines whether a rectangular area contains a point.

Returns inclusion attribute.

Parameters:

ParameterDefault valueDescription
bounds*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

External area

point*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

The point being checked.

* Mandatory parameter/option.

fromBounds

{Number[][]} fromBounds(sourceBounds)

Calculates the rectangular area that everything passed falls inside of.

Returns the calculated area.

Parameters:

ParameterDefault valueDescription
sourceBounds*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][][]

Array of rectangular areas

* Mandatory parameter/option.

fromPoints

{Number[][]} fromPoints(points)

Calculates the rectangular area that the passed points fall inside of.

Returns the calculated area.

Parameters:

ParameterDefault valueDescription
points*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

Array of points.

* Mandatory parameter/option.

getCenter

{Number[]} getCenter(bounds)

Calculates the center of the rectangular area.

Returns center point in the coordinate system of the input data.

Parameters:

ParameterDefault valueDescription
bounds*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

Area.

* Mandatory parameter/option.

getIntersection

{Number[][]|Null} getIntersection(bounds1, bounds2)

Calculates the intersection of two rectangular areas.

Returns the rectangular area that is formed by the intersection of the passed areas, or Null if the areas do not intersect.

Parameters:

ParameterDefault valueDescription
bounds1*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

First area.

bounds2*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

Second area.

* Mandatory parameter/option.

getSize

{Number[]} getSize(bounds)

Calculates the dimensions of a rectangular area.

Returns size of the area.

Parameters:

ParameterDefault valueDescription
bounds*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[][]

Area.

* Mandatory parameter/option.