             }
             
             x = emptySpaceLeft + Math.round((emptySpace - width) / 2);
-            x = Math.max(-Math.ceil(width / 2), Math.min(target.contentWidth - Math.ceil(width / 2), x));
-            y = row * (_rowHeight + _verticalGap);
+			// Allow 1 pixel overlap with container border
+            x = Math.max(-1, Math.min(target.contentWidth - width + 1, x));
+
+			y = row * (_rowHeight + _verticalGap);
         }
         else
         {

            }
            
            x = column * (_columnWidth + _horizontalGap);
            y = emptySpaceTop + Math.round((emptySpace - height) / 2);
            y = Math.max(-Math.ceil(height / 2), Math.min(target.contentHeight - Math.ceil(height / 2), y));
        }
        
        return new Rectangle(x, y, width, height);

        if (y > midRowLine)
            row++;
        
        // Limit row and column, if any one is too far from the drop location
		// And there is white space
		if (column > _columnCount || row > _rowCount)
		{
			row = _rowCount;
			column = _columnCount;
		}

		if (column < 0)
            column = 0;
        if (row < 0)
            row = 0;
        
        var index:int;
        if (rowOrientation)
