function translateCursorToGridCoords(canvas, coords, grid, resolution) {
    return {
        x: parseInt((coords.x / resolution), 10),
        y: parseInt((coords.y / resolution), 10)
    }
}
/**
 * Translates cursor coordinates to grid coordinates
 */
Translates cursor coordinates to grid coordinates
Translates cursor coordinates to grid coordinates
function translateCursorToGridCoords(canvas, coords, grid, resolution) {
    return {
        x: parseInt((coords.x / resolution), 10),
        y: parseInt((coords.y / resolution), 10)
    }
}
function translateCursorToGridCoords ( canvas , coords , grid , resolution ) { return { x : parseInt ( ( coords . x / resolution ) , 10 ) , y : parseInt ( ( coords . y / resolution ) , 10 ) } }
Translates cursor coordinates to grid coordinates
Translates cursor coordinates to grid coordinates