Partial fix for HTML5 drag and drop with collection views.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I
2010-04-20 23:51:18 -07:00
parent a18fb1b686
commit bbd402fcff
+8
View File
@@ -590,6 +590,14 @@
- (void)mouseDragged:(CPEvent)anEvent
{
var locationInWindow = [anEvent locationInWindow],
mouseDownLocationInWindow = [_mouseDownEvent locationInWindow];
// FIXME: This is because Safari's drag hysteresis is 3px x 3px
if ((ABS(locationInWindow.x - mouseDownLocationInWindow.x) < 3) &&
(ABS(locationInWindow.y - mouseDownLocationInWindow.y) < 3))
return;
if (![_delegate respondsToSelector:@selector(collectionView:dragTypesForItemsAtIndexes:)])
return;