Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Geometry.js

Issue 1996013004: DevTools: better SensorsView orientation fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/common/Geometry.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Geometry.js b/third_party/WebKit/Source/devtools/front_end/common/Geometry.js
index 1f8284c3f86d3ea6f6afd815c4ec0dfc9b7bc708..20a0525bd5439f6aa3db4eac5255a178181fe6e6 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Geometry.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Geometry.js
@@ -206,11 +206,11 @@ WebInspector.Geometry.EulerAngles.prototype = {
*/
toRotate3DString: function()
{
- var gammaAxisY = Math.sin(WebInspector.Geometry.degreesToRadians(this.beta));
+ var gammaAxisY = -Math.sin(WebInspector.Geometry.degreesToRadians(this.beta));
var gammaAxisZ = Math.cos(WebInspector.Geometry.degreesToRadians(this.beta));
var axis = {
- alpha: [0, -1, 0],
- beta: [1, 0, 0],
+ alpha: [0, 1, 0],
+ beta: [-1, 0, 0],
gamma: [0, gammaAxisY, gammaAxisZ]
};
return "rotate3d(" + axis.alpha.join(",") + "," + this.alpha + "deg) "

Powered by Google App Engine
This is Rietveld 408576698