Skip to content

Instantly share code, notes, and snippets.

@JBKahn
Created May 1, 2014 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JBKahn/ac1a09ae90d50c82ba3b to your computer and use it in GitHub Desktop.
Save JBKahn/ac1a09ae90d50c82ba3b to your computer and use it in GitHub Desktop.
Drag & Drop Safari Fix
isFlipping: (positions) =>
if positions.length < 4
return false
invalidA = ['above', 'below', 'above', 'below']
invalidB = ['below', 'above', 'below', 'above']
lastThree = _.last(positions, 4)
return _.isEqual(lastThree, invalidA) or _.isEqual(lastThree, invalidB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment