Created
May 4, 2015 08:02
-
-
Save sammyaxe/e2085e899df326007393 to your computer and use it in GitHub Desktop.
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
eventEmitter.on('_panmove', function (e) { | |
var x = lastTranslate.x + e.deltaX, | |
y = lastTranslate.y + e.deltaY, | |
r = config.rotation(x, y, targetElement, config.maxRotation); | |
if(e.deltaX > 150 || e.deltaX < -150 ) card.throwOut(x, y); | |
config.transform(targetElement, x, y, r); | |
eventEmitter.trigger('dragmove', { | |
target: targetElement, | |
throwOutConfidence: config.throwOutConfidence(x, targetElement), | |
throwDirection: x < 0 ? Card.DIRECTION_LEFT : Card.DIRECTION_RIGHT | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment