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

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: Use a safer cast on integer conversions. 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
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14cf8080f84ed4232764f9345974729f686dea28..b3306be198b90fba7dc3cc3b2f3c51c050c7b0d7 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
@@ -143,8 +143,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;
}
}
@@ -207,7 +209,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;
}
/**
@@ -217,7 +220,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;
}
/**
@@ -229,7 +234,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;
}
/**
@@ -241,7 +249,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;
}
/**
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698