Skip to content
Browse files

handle inversion multiplier in all cases

  • Loading branch information...
1 parent f1c0c49 commit 39637f3f21a0454e05206363ca31ae3613187d59 @dzuelke dzuelke committed Oct 14, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/plax.js
View
4 js/plax.js
@@ -55,7 +55,7 @@
var layer = {
"xRange": $(this).data('xrange') || 0,
"yRange": $(this).data('yrange') || 0,
- "inverter": $(this).data('invert') ? -1 : 1 // inversion multiplier for computations
+ "invert": $(this).data('invert') || 0
}
for (var i=0;i<layers.length;i++){
@@ -70,6 +70,8 @@
}
}
+ layer.inverter = (layer.invert ? -1 : 1) // inversion factor for calculations
+
// Add an object to the list of things to parallax
layer.obj = $(this)
layer.startX = this.offsetLeft

0 comments on commit 39637f3

Please sign in to comment.
Something went wrong with that request. Please try again.