Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
whitespace only
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Jehl committed Dec 10, 2012
1 parent 74a0b2e commit 522c3d7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions js/jquery.mobile.zoom.iosorientationfix.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.zoom" ], function(
return;
}

var zoom = $.mobile.zoom,
var zoom = $.mobile.zoom,
evt, x, y, z, aig;

function checkTilt( e ) {
function checkTilt( e ) {
evt = e.originalEvent;
aig = evt.accelerationIncludingGravity;

Expand All @@ -25,16 +25,16 @@ 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 ( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ) {
if ( zoom.enabled ) {
zoom.disable();
}
} else if ( !zoom.enabled ) {
zoom.enable();
}
}

$( window )
if ( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ) {
if ( zoom.enabled ) {
zoom.disable();
}
} else if ( !zoom.enabled ) {
zoom.enable();
}
}

$( window )
.bind( "orientationchange.iosorientationfix", zoom.enable )
.bind( "devicemotion.iosorientationfix", checkTilt );

Expand Down

0 comments on commit 522c3d7

Please sign in to comment.