[Eraser strings] Remove unused Supervised User infobar and corresponding strings
[chromium-blink-merge.git] / chrome / browser / resources / pdf / elements / viewer-zoom-toolbar / viewer-zoom-toolbar.js
blob515b49df1cc97fc28c46e093c6bdde11c52c0d0c
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 ANIMATION_INTERVAL = 50;
7 Polymer({
8 is: 'viewer-zoom-toolbar',
10 properties: {
11 /**
12 * The default zoom percentage.
14 zoomValue: {
15 type: Number,
16 value: 100
20 get visible() {
21 return this.visible_;
24 ready: function() {
25 this.visible_ = true;
28 fitToPage: function() {
29 this.fire('fit-to-page');
32 fitToWidth: function() {
33 this.fire('fit-to-width');
36 zoomIn: function() {
37 this.fire('zoom-in');
40 zoomOut: function() {
41 this.fire('zoom-out');
44 show: function() {
45 if (!this.visible) {
46 this.visible_ = true;
47 this.$['fit-to-width-button'].show();
48 this.$['fit-to-page-button'].show();
49 this.$['zoom-in-button'].show();
50 this.$['zoom-out-button'].show();
54 hide: function() {
55 if (this.visible) {
56 this.visible_ = false;
57 this.$['fit-to-page-button'].hide();
58 this.$['fit-to-width-button'].hide();
59 this.$['zoom-in-button'].hide();
60 this.$['zoom-out-button'].hide();
63 });