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 Polymer('viewer-pane', {
8 * The heading to be used in the pane.
14 * Whether the pane was opened by the user.
17 return this.openedByUser_;
22 * Whether the pane is currently visible.
29 * Override openAction to prevent paper-dialog-base from scrolling back to
32 openAction: function() {
38 this.openedByUser_ = false;
39 this.visible_ = false;
43 * Makes the pane appear if it was opened by the user.
44 * This is used if we need to show the pane but only if it was already opened.
46 showIfOpenedByUser: function() {
47 if (this.openedByUser && !this.visible) {
54 * Hides the pane if it was opened by the user.
55 * This is used if we need to hide the pane but remember that it was opened.
57 hideIfOpenedByUser: function() {
58 if (this.openedByUser && this.visible) {
60 this.visible_ = false;
64 buttonToggle: function() {
65 this.openedByUser_ = !this.openedByUser_;
66 this.visible_ = this.openedByUser_;