Fix: on move, items are now dropping where the

visualization says they will drop

Change-Id: I5b1d3d713991468c1b17458356b2ff1a630aa9b9
This commit is contained in:
Michael Jurka
2010-09-30 13:22:31 -07:00
parent 2942969e5a
commit fc9f07d425
+1 -4
View File
@@ -1156,15 +1156,12 @@ public class Workspace extends SmoothPagedView
private int[] findNearestVacantArea(int pixelX, int pixelY,
int spanX, int spanY, View ignoreView, CellLayout layout, int[] recycle) {
final int[] cellXY = mTempCell;
int localPixelX = pixelX - (layout.getLeft() - mScrollX);
int localPixelY = pixelY - (layout.getTop() - mScrollY);
layout.estimateDropCell(localPixelX, localPixelY, spanX, spanY, cellXY);
layout.cellToPoint(cellXY[0], cellXY[1], mTempEstimate);
// Find the best target drop location
return layout.findNearestVacantArea(
mTempEstimate[0], mTempEstimate[1], spanX, spanY, ignoreView, recycle);
localPixelX, localPixelY, spanX, spanY, ignoreView, recycle);
}
/**