Permalink
Browse files

Merge pull request #34 from cameronmcefee/holman-gyro

Return so we don't hit the first one
  • Loading branch information...
Cameron McEfee
Cameron McEfee committed Dec 11, 2012
2 parents 0dcb785 + 499ee4a commit 1ba0c2c5adf8740337102368b3a7117269f1aff7
Showing with 2 additions and 0 deletions.
  1. +2 −0 js/plax.js
View
@@ -139,6 +139,7 @@
topOffset = (plaxActivityTarget.offset() != null) ? plaxActivityTarget.offset().top : 0,
x = e.pageX-leftOffset,
y = e.pageY-topOffset
+
if (
x < 0 || x > plaxActivityTarget.width() ||
y < 0 || y > plaxActivityTarget.height()
@@ -147,6 +148,7 @@
if(moveable()){
if(e.gamma == undefined){
ignoreMoveable = true
+ return
}
values = valuesFromMotion(e)

0 comments on commit 1ba0c2c

Please sign in to comment.