| Index: chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-toolbar.js
|
| diff --git a/chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-toolbar.js b/chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-toolbar.js
|
| index 3ade73b7174a78855fed005c89f5afdb0375bc53..6a4af8f4aa3c4a99e48b53c85a901646b70fbb0e 100644
|
| --- a/chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-toolbar.js
|
| +++ b/chrome/browser/resources/pdf/elements/viewer-zoom-toolbar/viewer-zoom-toolbar.js
|
| @@ -4,96 +4,88 @@
|
|
|
| (function() {
|
|
|
| - var FIT_TO_PAGE = 0;
|
| - var FIT_TO_WIDTH = 1;
|
| +var FIT_TO_PAGE = 0;
|
| +var FIT_TO_WIDTH = 1;
|
|
|
| - Polymer({
|
| - is: 'viewer-zoom-toolbar',
|
| +Polymer({
|
| + is: 'viewer-zoom-toolbar',
|
|
|
| - properties: {
|
| - strings: {
|
| - type: Object,
|
| - observer: 'updateTooltips_'
|
| - },
|
| + properties: {
|
| + strings: {type: Object, observer: 'updateTooltips_'},
|
|
|
| - visible_: {
|
| - type: Boolean,
|
| - value: true
|
| - }
|
| - },
|
| + visible_: {type: Boolean, value: true}
|
| + },
|
|
|
| - isVisible: function() {
|
| - return this.visible_;
|
| - },
|
| + isVisible: function() {
|
| + return this.visible_;
|
| + },
|
|
|
| - /**
|
| - * @private
|
| - * Change button tooltips to match any changes to localized strings.
|
| - */
|
| - updateTooltips_: function() {
|
| - this.$['fit-button'].tooltips = [
|
| - this.strings.tooltipFitToPage,
|
| - this.strings.tooltipFitToWidth
|
| - ];
|
| - this.$['zoom-in-button'].tooltips = [this.strings.tooltipZoomIn];
|
| - this.$['zoom-out-button'].tooltips = [this.strings.tooltipZoomOut];
|
| - },
|
| + /**
|
| + * @private
|
| + * Change button tooltips to match any changes to localized strings.
|
| + */
|
| + updateTooltips_: function() {
|
| + this.$['fit-button'].tooltips =
|
| + [this.strings.tooltipFitToPage, this.strings.tooltipFitToWidth];
|
| + this.$['zoom-in-button'].tooltips = [this.strings.tooltipZoomIn];
|
| + this.$['zoom-out-button'].tooltips = [this.strings.tooltipZoomOut];
|
| + },
|
|
|
| - /**
|
| - * Handle clicks of the fit-button.
|
| - */
|
| - fitToggle: function() {
|
| - if (this.$['fit-button'].activeIndex == FIT_TO_WIDTH)
|
| - this.fire('fit-to-width');
|
| - else
|
| - this.fire('fit-to-page');
|
| - },
|
| + /**
|
| + * Handle clicks of the fit-button.
|
| + */
|
| + fitToggle: function() {
|
| + if (this.$['fit-button'].activeIndex == FIT_TO_WIDTH)
|
| + this.fire('fit-to-width');
|
| + else
|
| + this.fire('fit-to-page');
|
| + },
|
|
|
| - /**
|
| - * Handle the keyboard shortcut equivalent of fit-button clicks.
|
| - */
|
| - fitToggleFromHotKey: function() {
|
| - this.fitToggle();
|
| + /**
|
| + * Handle the keyboard shortcut equivalent of fit-button clicks.
|
| + */
|
| + fitToggleFromHotKey: function() {
|
| + this.fitToggle();
|
|
|
| - // Toggle the button state since there was no mouse click.
|
| - var button = this.$['fit-button'];
|
| - if (button.activeIndex == FIT_TO_WIDTH)
|
| - button.activeIndex = FIT_TO_PAGE;
|
| - else
|
| - button.activeIndex = FIT_TO_WIDTH;
|
| - },
|
| + // Toggle the button state since there was no mouse click.
|
| + var button = this.$['fit-button'];
|
| + if (button.activeIndex == FIT_TO_WIDTH)
|
| + button.activeIndex = FIT_TO_PAGE;
|
| + else
|
| + button.activeIndex = FIT_TO_WIDTH;
|
| + },
|
|
|
| - /**
|
| - * Handle clicks of the zoom-in-button.
|
| - */
|
| - zoomIn: function() {
|
| - this.fire('zoom-in');
|
| - },
|
| + /**
|
| + * Handle clicks of the zoom-in-button.
|
| + */
|
| + zoomIn: function() {
|
| + this.fire('zoom-in');
|
| + },
|
|
|
| - /**
|
| - * Handle clicks of the zoom-out-button.
|
| - */
|
| - zoomOut: function() {
|
| - this.fire('zoom-out');
|
| - },
|
| + /**
|
| + * Handle clicks of the zoom-out-button.
|
| + */
|
| + zoomOut: function() {
|
| + this.fire('zoom-out');
|
| + },
|
|
|
| - show: function() {
|
| - if (!this.visible_) {
|
| - this.visible_ = true;
|
| - this.$['fit-button'].show();
|
| - this.$['zoom-in-button'].show();
|
| - this.$['zoom-out-button'].show();
|
| - }
|
| - },
|
| + show: function() {
|
| + if (!this.visible_) {
|
| + this.visible_ = true;
|
| + this.$['fit-button'].show();
|
| + this.$['zoom-in-button'].show();
|
| + this.$['zoom-out-button'].show();
|
| + }
|
| + },
|
|
|
| - hide: function() {
|
| - if (this.visible_) {
|
| - this.visible_ = false;
|
| - this.$['fit-button'].hide();
|
| - this.$['zoom-in-button'].hide();
|
| - this.$['zoom-out-button'].hide();
|
| - }
|
| - },
|
| - });
|
| + hide: function() {
|
| + if (this.visible_) {
|
| + this.visible_ = false;
|
| + this.$['fit-button'].hide();
|
| + this.$['zoom-in-button'].hide();
|
| + this.$['zoom-out-button'].hide();
|
| + }
|
| + },
|
| +});
|
|
|
| })();
|
|
|