Created
May 1, 2014 18:14
-
-
Save JBKahn/ac1a09ae90d50c82ba3b to your computer and use it in GitHub Desktop.
Drag & Drop Safari Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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