Do not fire the event if there is no change in deltaX and deltaY

This commit is contained in:
Brandon Aaron
2013-11-13 12:21:46 -05:00
parent b1a07617f2
commit 36ece575ac
+3
View File
@@ -100,6 +100,9 @@
delta = detlaX * -1;
}
// No change actually happened, no reason to go any further
if ( deltaY === 0 && deltaX === 0 ) { return; }
// Look for lowest delta to normalize the delta values
absDelta = Math.abs(delta);
if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; }