window not w, evt wasn't defined. Thanks @staabm

This commit is contained in:
scottjehl 2012-01-24 02:12:42 +07:00
parent 5725b4bac9
commit edad9c1f9a

View file

@ -6,7 +6,7 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.zoom" ], function( $ )
//>>excludeEnd("jqmBuildExclude");
( function( $, window ) {
var zoom = $.mobile.zoom,
x, y, z, aig;
evt, x, y, z, aig;
function checkTilt( e ){
evt = e.originalEvent;
@ -17,7 +17,7 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.zoom" ], function( $ )
z = Math.abs( aig.z );
// If portrait orientation and in one of the danger zones
if( !w.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
if( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
if( zoom.enabled ){
zoom.disable();
}