SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.pointToIndex  method

Return Cell Location located in relative coordinate (x, y) of grid. 

function pointToIndex (x: Number, y: Number, clipped: Boolean): CellIndex;
Returns
CellIndex
Parameters
x - Number.
y - Number.
clipped - Boolean.
Code -1
    var idx = grid.pointToIndex(100, 100);
    grid.setFocusedCell(idx);
See Also
CellIndex