[OpenLayers-Commits] r11306 - sandbox/sbrunner/test

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 23 06:41:33 EST 2011


Author: sbrunner
Date: 2011-02-23 03:41:33 -0800 (Wed, 23 Feb 2011)
New Revision: 11306

Modified:
   sandbox/sbrunner/test/orientation.html
Log:
add screen orientation

Modified: sandbox/sbrunner/test/orientation.html
===================================================================
--- sandbox/sbrunner/test/orientation.html	2011-02-23 11:40:36 UTC (rev 11305)
+++ sandbox/sbrunner/test/orientation.html	2011-02-23 11:41:33 UTC (rev 11306)
@@ -19,7 +19,7 @@
                     window.addEventListener("deviceorientation", function (event) {
                         if (typeof(event.alpha) != 'undefined') {
                             var img = document.getElementById("orientation");
-                            var value = "rotate(" + event.alpha + "deg)";
+                            var value = "rotate(" + (event.alpha + window.orientation - 90) + "deg)";
                             img.style.transform = value;
                             img.style.webkitTransform = value;
                         }



More information about the Commits mailing list