hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

Cannot specify starting row when searching position for an item #10

Closed valentinzberea closed 10 years ago

valentinzberea commented 10 years ago

findPositionForItem accepts only startCol and will use startRow=0 https://github.com/uberVU/grid/blob/master/lib/gridList.js#L192

We would need to supply also a starting row.

ovidiuch commented 10 years ago

Could you explain the need for this please?

valentinzberea commented 10 years ago

If I'm trying to find a position for an item as the last one I can do _findPositionForItem(item, lastColumn) and this will give me a position on the last column starting with row 0: https://github.com/uberVU/grid/blob/master/lib/gridList.js#L192 which doesn't guarantee it ill be the last item (maybe there is an item at x: lastColumn, y: 1)