Description

Retrieve the column and row in the grid according to the positions. Returns this object : {col: , row: }

Usage

Parameters

  • x {Integer}

    Position X

  • y {Integer}

    Position Y

Returns

Object

Example

In ready method

var grid = Class.New("Grid", [2, 2]);
grid.setCellSize(32, 32);
grid.getCellByPos(53, 35); // return {col: 1, row: 1}

Discussion