Commit 05f9f025 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Audio Player: Remove dead code

The use of matchBottomLine() function was removed in:
https://codereview.chromium.org/1491543002

Fix var/let violations pointed out by the presubmit.

Change-Id: I94bc7853623ec73e54c066030bca60da37e5795d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525880
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJeremie Boulic <jboulic@chromium.org>
Commit-Queue: Jeremie Boulic <jboulic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825273}
parent 51a18cc1
...@@ -17,31 +17,11 @@ ...@@ -17,31 +17,11 @@
* volumeSlider: string, * volumeSlider: string,
* }} * }}
*/ */
var AriaLabels; let AriaLabels;
(function() { (function() {
'use strict'; 'use strict';
/**
* Moves |target| element above |anchor| element, in order to match the
* bottom lines.
* @param {HTMLElement} target Target element.
* @param {HTMLElement} anchor Anchor element.
*/
function matchBottomLine(target, anchor) {
var targetRect = target.getBoundingClientRect();
var anchorRect = anchor.getBoundingClientRect();
var pos = {
left: anchorRect.left + anchorRect.width / 2 - targetRect.width / 2,
bottom: window.innerHeight - anchorRect.bottom,
};
target.style.position = 'fixed';
target.style.left = pos.left + 'px';
target.style.bottom = pos.bottom + 'px';
}
Polymer({ Polymer({
is: 'control-panel', is: 'control-panel',
...@@ -137,12 +117,13 @@ var AriaLabels; ...@@ -137,12 +117,13 @@ var AriaLabels;
* element is ready. * element is ready.
*/ */
ready: function() { ready: function() {
var timeSlider = /** @type {!CrSliderElement} */ (this.$.timeSlider); const timeSlider = /** @type {!CrSliderElement} */ (this.$.timeSlider);
timeSlider.addEventListener('cr-slider-value-changed', () => { timeSlider.addEventListener('cr-slider-value-changed', () => {
this.fire('update-time', timeSlider.value); this.fire('update-time', timeSlider.value);
}); });
var volumeSlider = /** @type {!CrSliderElement} */ (this.$.volumeSlider); const volumeSlider =
/** @type {!CrSliderElement} */ (this.$.volumeSlider);
volumeSlider.addEventListener('cr-slider-value-changed', () => { volumeSlider.addEventListener('cr-slider-value-changed', () => {
this.volume = volumeSlider.value; this.volume = volumeSlider.value;
}); });
...@@ -203,9 +184,9 @@ var AriaLabels; ...@@ -203,9 +184,9 @@ var AriaLabels;
* @private * @private
*/ */
skip_: function(small, forward) { skip_: function(small, forward) {
var maxSkip = small ? 5000 : 10000; const maxSkip = small ? 5000 : 10000;
var percentOfDuration = (small ? .1 : .2) * this.duration; const percentOfDuration = (small ? .1 : .2) * this.duration;
var update = (forward ? 1 : -1) * Math.min(maxSkip, percentOfDuration); const update = (forward ? 1 : -1) * Math.min(maxSkip, percentOfDuration);
if (this.duration > 0) { if (this.duration > 0) {
this.fire( this.fire(
'update-time', 'update-time',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment