summaryrefslogtreecommitdiff
path: root/chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js')
-rw-r--r--chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js b/chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js
index 5ba1e551929..e3be0c995ea 100644
--- a/chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js
+++ b/chromium/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.js
@@ -33,16 +33,18 @@ Polymer({
/** Toggles the drawer open and close. */
toggle: function() {
- if (this.open)
+ if (this.open) {
this.cancel();
- else
+ } else {
this.openDrawer();
+ }
},
/** Shows drawer and slides it into view. */
openDrawer: function() {
- if (this.open)
+ if (this.open) {
return;
+ }
this.$.dialog.showModal();
this.show_ = true;
this.fire('cr-drawer-opening');
@@ -58,8 +60,9 @@ Polymer({
* @param {boolean} cancel
*/
dismiss_: function(cancel) {
- if (!this.open)
+ if (!this.open) {
return;
+ }
this.show_ = false;
listenOnce(this.$.dialog, 'transitionend', () => {
this.$.dialog.close(cancel ? 'canceled' : 'closed');