SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.pointToIndex method
返回位于网格相对坐标(x、y)的单元格位置。
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