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

Unified Diff: chrome/browser/resources/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js
diff --git a/chrome/browser/resources/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js b/chrome/browser/resources/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js
index 17a04c04d7b682b264c367de0e35cea3b8084643..f0ce6814712654f2f0d7d976f2ce4c40e2ef900e 100644
--- a/chrome/browser/resources/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js
+++ b/chrome/browser/resources/pdf/elements/viewer-toolbar-dropdown/viewer-toolbar-dropdown.js
@@ -28,11 +28,7 @@
openIcon: String,
/** True if the dropdown is currently open. */
- dropdownOpen: {
- type: Boolean,
- reflectToAttribute: true,
- value: false
- },
+ dropdownOpen: {type: Boolean, reflectToAttribute: true, value: false},
/** Toolbar icon currently being displayed. */
dropdownIcon: {
@@ -41,10 +37,7 @@
},
/** Lowest vertical point that the dropdown should occupy (px). */
- lowerBound: {
- type: Number,
- observer: 'lowerBoundChanged_'
- },
+ lowerBound: {type: Number, observer: 'lowerBoundChanged_'},
/**
* True if the max-height CSS property for the dropdown scroll container
@@ -81,8 +74,7 @@
updateMaxHeight: function() {
var scrollContainer = this.$['scroll-container'];
var height = this.lowerBound -
- scrollContainer.getBoundingClientRect().top -
- DROPDOWN_INNER_PADDING;
+ scrollContainer.getBoundingClientRect().top - DROPDOWN_INNER_PADDING;
height = Math.max(height, MIN_DROPDOWN_HEIGHT);
scrollContainer.style.maxHeight = height + 'px';
this.maxHeightValid_ = true;
@@ -115,23 +107,27 @@
if (maxHeight < 0)
maxHeight = 0;
- var fade = new KeyframeEffect(this.$.dropdown, [
- {opacity: 0},
- {opacity: 1}
- ], {duration: 150, easing: 'cubic-bezier(0, 0, 0.2, 1)'});
- var slide = new KeyframeEffect(this.$.dropdown, [
+ var fade = new KeyframeEffect(
+ this.$.dropdown, [{opacity: 0}, {opacity: 1}],
+ {duration: 150, easing: 'cubic-bezier(0, 0, 0.2, 1)'});
+ var slide = new KeyframeEffect(
+ this.$.dropdown,
+ [
{height: '20px', transform: 'translateY(-10px)'},
{height: maxHeight + 'px', transform: 'translateY(0)'}
- ], {duration: 250, easing: 'cubic-bezier(0, 0, 0.2, 1)'});
+ ],
+ {duration: 250, easing: 'cubic-bezier(0, 0, 0.2, 1)'});
return document.timeline.play(new GroupEffect([fade, slide]));
},
animateExit_: function() {
- return this.$.dropdown.animate([
+ return this.$.dropdown.animate(
+ [
{transform: 'translateY(0)', opacity: 1},
{transform: 'translateY(-5px)', opacity: 0}
- ], {duration: 100, easing: 'cubic-bezier(0.4, 0, 1, 1)'});
+ ],
+ {duration: 100, easing: 'cubic-bezier(0.4, 0, 1, 1)'});
}
});

Powered by Google App Engine
This is Rietveld 408576698