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

Unified Diff: ui/file_manager/audio_player/elements/volume_controller.js

Issue 1015463006: [Audio Player] Cleanup the code along with closure compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 9 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: ui/file_manager/audio_player/elements/volume_controller.js
diff --git a/ui/file_manager/audio_player/elements/volume_controller.js b/ui/file_manager/audio_player/elements/volume_controller.js
index f50abad40a7ca9702233a12d140d18abfc5491a0..4e9fa625d0c8a7f1d877a09abaa7018f6c8510c4 100644
--- a/ui/file_manager/audio_player/elements/volume_controller.js
+++ b/ui/file_manager/audio_player/elements/volume_controller.js
@@ -5,7 +5,13 @@
(function() {
'use strict';
- Polymer('volume-controller', {
+ /**
+ * @constructor
+ * @extends {PolymerElement}
+ */
+ var VolumeControllerElement = function() {};
+
+ VolumeControllerElement.prototype = {
/**
* Initializes an element. This method is called automatically when the
* element is ready.
@@ -14,15 +20,18 @@
this.style.width = this.width + 'px';
this.style.height = this.height + 'px';
- this.$.rawValueInput.style.width = this.height + 'px';
- this.$.rawValueInput.style.height = this.width + 'px';
- this.$.rawValueInput.style.webkitTransformOrigin =
+ this.rawValueInput = this.$.rawValueInput;
+ this.bar = this.$.bar;
+
+ this.rawValueInput.style.width = this.height + 'px';
+ this.rawValueInput.style.height = this.width + 'px';
+ this.rawValueInput.style.webkitTransformOrigin =
(this.width / 2) + 'px ' +
(this.width / 2 - 2) + 'px';
var barLeft = (this.width / 2 - 1);
- this.$.bar.style.left = barLeft + 'px';
- this.$.bar.style.right = barLeft + 'px';
+ this.bar.style.left = barLeft + 'px';
+ this.bar.style.right = barLeft + 'px';
this.addEventListener('keydown', this.onKeyDown_.bind(this));
},
@@ -111,5 +120,7 @@
break;
}
},
- });
+ };
+
+ Polymer('volume-controller', VolumeControllerElement.prototype);
})(); // Anonymous closure
« no previous file with comments | « ui/file_manager/audio_player/elements/track_list.js ('k') | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698