6,17d5 < < < var wasthisso='' + (screen.msOrientation || screen.mozOrientation || (screen.orientation || {}).type); //"portrait"; < var wasangle=eval(180 - eval('' + window.orientation)); < < //var wasangle='' + (screen.msOrientation || screen.mozOrientation || (screen.orientation || {}).angle); //"portrait"; < //alert('' + wasangle); < //if (screen.orientation.angle) { < // wasangle=eval('' + screen.orientation.angle); < //} < < 20d7 < var zalpha=0, chalpha=null; 92,99d78 < if (chalpha != null) { < zalpha='' + chalpha; < } else { < zalpha='' + event.accelerationIncludingGravity.z; < } < if (iz != '') { < if (iz.indexOf(' ' + zalpha + ' ') == -1) { iz+=zalpha + ' ' } < } 118,125d96 < if (chalpha != null) { < zalpha='' + chalpha; < } else { < zalpha='' + event.accelerationIncludingGravity.z; < } < if (iz != '') { < if (iz.indexOf(' ' + zalpha + ' ') == -1) { iz+=zalpha + ' ' } < } 152,177d122 < window.addEventListener("orientationchange", function() { < // Announce the new orientation number < //if (screen.orientation.angle) { < // wasangle=eval('' + screen.orientation.angle); < //} < //document.title='' + wasangle; < //alert('' + wasangle); < //alert(window.orientation); < wasangle=eval(180 - eval('' + window.orientation)); < var thisso='' + screen.msOrientation || screen.mozOrientation || (screen.orientation || {}).type; < if (('' + thisso) == 'undefined') { < var mql=window.matchMedia("(orientation: portrait)"); < // If there are matches, we're in portrait < if (mql.matches) { < thisso="Portrait"; // Portrait orientation < } else { < thisso="Landscape"; // Landscape orientation < } < } < < if (thisso != wasthisso) { < wasthisso=thisso; < //alert('ori'); < } < }, false); < 189,190d133 < var origsel=""; < 203,204c146 < var initial_z=0; < var iz=''; --- > var origsel=""; 236,242d177 < if (chalpha != null) { < initial_z=eval('0' + chalpha); < chalpha=null; < } else { < initial_z=eval('0' + zalpha); < } < if (document.URL.indexOf('z=') != -1 || 56 == 56) { iz=' ' + initial_z + ' '; } 255,258d189 < if (iz != '') { < //alert(iz); < iz=''; < } 417d347 < if (origsel) { 419d348 < } 437c366 < function deviceOrientationHandler(xtiltLeftToRight, xtiltFrontToBack, xbrg, xabsolute, xcb, xcbacc) { //tiltLeftToRight, tiltFrontToBack, brg) { --- > function deviceOrientationHandler(xtiltLeftToRight, xtiltFrontToBack, xbrg) { //tiltLeftToRight, tiltFrontToBack, brg) { 441,459c370 < if ((document.URL.indexOf('z=') != -1 || 56 == 56) && xabsolute !== true && +xcbacc > 0 && +xcbacc < 50) { < //document.getElementById("doBearing").innerHTML = Math.round(xbrg) + '.' + Math.round(xcb || 0); < //document.getElementById("doBearing").innerHTML = ('' + Math.round(xbrg) + '.' + Math.round(xcb || 0)).split('.')[1]; < document.getElementById("doBearing").innerHTML = ('' + Math.round(xcb || 0) + '.' + Math.round(xbrg)).split('.')[0]; < if (Math.round(xcb || 0) != Math.round(xbrg)) { < try { document.getElementById('compass_needle').style.webkitTransform = ("rotate(" + Math.round(xcb || 0) + "deg)"); } catch(e10) { } < try { document.getElementById('compass_needle').style.MozTransform = ("rotate(" + Math.round(xcb || 0) + "deg)"); } catch(e1000) { } < try { document.getElementById('compass_needle').style.msTransform = ("rotate(" + Math.round(xcb || 0) + "deg)"); } catch(e100) { } < try { document.getElementById('compass_needle').style.OTransform = ("rotate(" + Math.round(xcb || 0) + "deg)"); } catch(e10000) { } < try { document.getElementById('compass_needle').style.transform = ("rotate(" + Math.round(xcb || 0) + "deg)"); } catch(e1) { } < if (initial_yaw == Math.round(brg)) { < brg=xcb || 0; < } else { < brg=xcb || 0; < } < } < } else { < document.getElementById("doBearing").innerHTML = Math.round(xbrg); < } --- > document.getElementById("doBearing").innerHTML = Math.round(xbrg); 487d397 < if (origsel) { 489d398 < } 495,501c404 < //if (eventData.webkitCompassHeading) { < // chalpha=eval('' + eventData.webkitCompassHeading); < //} < // if (chalpha === null && eventData.absolute !== true && +eventData.webkitCompassAccuracy > 0 && +eventData.webkitCompassAccuracy < 50) { < // chalpha = eventData.webkitCompassHeading || 0; < // } < // gamma is the left-to-right tilt in degrees, where right is positive --- > // gamma is the left-to-right tilt in degrees, where right is positive 509,514d411 < if (eventData.absolute !== true && +eventData.webkitCompassAccuracy > 0 && +eventData.webkitCompassAccuracy < 50) { < brg = eval('' + eventData.webkitCompassHeading || 0); < if (document.getElementById('yaw_h').innerHTML.indexOf('
| N |
| ⬆ |