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

Unified Diff: chrome/browser/resources/vr_shell/vr_shell_ui_api.js

Issue 2706343005: Allow individual UI element properties to be modified. (Closed)
Patch Set: Tweaks. Created 3 years, 10 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: chrome/browser/resources/vr_shell/vr_shell_ui_api.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
index 751372d09bf2c80b6f3535db40f9e4c33dc6eb33..d81dee3c64d92d3af129c3f798bbfe7223cf8215 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
@@ -139,8 +139,10 @@ api.Fill = class {
api.Sprite = class extends api.Fill {
constructor(pixelX, pixelY, pixelWidth, pixelHeight) {
super(api.FillType.SPRITE);
- this.properties.copyRect =
- {x: pixelX, y: pixelY, width: pixelWidth, height: pixelHeight};
+ this.properties['copyRectX'] = pixelX;
+ this.properties['copyRectY'] = pixelY;
+ this.properties['copyRectWidth'] = pixelWidth;
+ this.properties['copyRectHeight'] = pixelHeight;
}
}
@@ -203,7 +205,8 @@ api.UiElementUpdate = class {
* @param {number} y
*/
setSize(x, y) {
- this.properties['size'] = {x: x, y: y};
+ this.properties['sizeX'] = x;
+ this.properties['sizeY'] = y;
}
/**
@@ -213,7 +216,9 @@ api.UiElementUpdate = class {
* @param {number} z
*/
setScale(x, y, z) {
- this.properties['scale'] = {x: x, y: y, z: z};
+ this.properties['scaleX'] = x;
+ this.properties['scaleY'] = y;
+ this.properties['scaleZ'] = z;
}
/**
@@ -225,7 +230,10 @@ api.UiElementUpdate = class {
* @param {number} a
*/
setRotation(x, y, z, a) {
- this.properties['rotation'] = {x: x, y: y, z: z, a: a};
+ this.properties['rotationX'] = x;
+ this.properties['rotationY'] = y;
+ this.properties['rotationZ'] = z;
+ this.properties['rotationAngle'] = a;
}
/**
@@ -237,7 +245,9 @@ api.UiElementUpdate = class {
* @param {number} z
*/
setTranslation(x, y, z) {
- this.properties['translation'] = {x: x, y: y, z: z};
+ this.properties['translationX'] = x;
+ this.properties['translationY'] = y;
+ this.properties['translationZ'] = z;
}
/**

Powered by Google App Engine
This is Rietveld 408576698