Description
I am attempting to use get_cell_from_pixel()
to implement dragging and dropping items from another list to add them to my grid, but I'm not getting back the values I expect.
I'm passing in a position relative to the document, but since get_cell_from_pixel()
internally compares that against this.container.position()
(and since my grid is in a div with position:relative
) the calculation is off.
From the name, I had assumed the function worked from a pixel position relative to the document. I was wondering if there was a reason you used this.container.position()
instead of this.container.offset()
? Or if there is, is it possible to add in an optional argument that would use this.container.offset()
? If it's a feature you'd be interested in adding, I could implement it and create the PR myself if you'd like.