Share via


ILayout2.hitTest method

Gets the item at the specified hit-test coordinates. These coordinates are absolute coordinates (they are not relative to the layout's content area).

Syntax

var object = iLayout2.hitTest(x, y);

Parameters

  • x
    Type: Number

    The x-coordinate to test for.

  • y
    Type: Number

    The y-coordinate to test for.

Return value

Type: Object

An object that describes the item at the hit test coordinates. It has these properties:

Term Description

type

An WinJS.UI.ObjectType value that specifies whether the item at the specified coordinates is an item or a group header.

index

The index of the item at the specified coordinates.

 

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ILayout2