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

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

Issue 2592143002: First cut of JS closure compiler use for VR HTML UI. (Closed)
Patch Set: Remove test file. Created 4 years 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_scene.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
index a83ef30ea09ca787a67c6ac658469cb65ab024e5..cc68712292e4810428ed77e331021463e84ca600 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
@@ -19,7 +19,7 @@ var ui = (function() {
* el.setSize(buttonWidth, buttonHeight);
*
* // Anchor it to the bottom of the content quad.
- * el.setParentId(api.getContentElementId());
+ * el.setParentId(contentQuadId);
* el.setAnchoring(api.XAnchoring.XNONE, api.YAnchoring.YBOTTOM);
*
* // Place it just below the content quad edge.
@@ -44,7 +44,7 @@ var ui = (function() {
class Scene {
constructor() {
- this.idIndex = api.getContentElementId() + 1;
+ this.idIndex = 1;
this.commands = [];
this.elements = new Set();
this.animations = {};
@@ -80,7 +80,7 @@ var ui = (function() {
update.id = id;
this.commands.push({
'type': api.Command.UPDATE_ELEMENT,
- 'data': update
+ 'data': update.properties
});
}
@@ -133,7 +133,7 @@ var ui = (function() {
purge() {
var ids = Object.keys(this.animations);
for (let id_key of ids) {
- var id = parseInt(id_key);
+ var id = parseInt(id_key, 10);
this.removeAnimation(id);
}
var ids = this.elements.values();

Powered by Google App Engine
This is Rietveld 408576698