From bc2fd54fda5abfaa005a7e44cfa916680129ce67 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 16 Mar 2016 00:06:30 -0400 Subject: [PATCH] restore paper-drawer-panel.html changes --- .../paper-drawer-panel.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html index 35a4947a7..2ff12eb5a 100644 --- a/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html +++ b/dashboard-ui/bower_components/paper-drawer-panel/paper-drawer-panel.html @@ -591,8 +591,8 @@ Custom property | Description | Default this.notifyResize(); } if (e.propertyName === 'transform' && this.selected === 'drawer') { - var focusedChild = this._getAutoFocusedNode(); - focusedChild && focusedChild.focus(); + //var focusedChild = this._getAutoFocusedNode(); + //focusedChild && focusedChild.focus(); } }, @@ -761,6 +761,12 @@ Custom property | Description | Default } this._setPeeking(false); } + var dy = event.detail.dy; + var absDy = Math.abs(dy); + if (absDy >= 70) { + // Ignore trackx until we move past the edge peek. + return; + } this._moveDrawer(this._translateXForDeltaX(dx)); } @@ -775,10 +781,13 @@ Custom property | Description | Default sharedPanel = null; this._moveDrawer(null); + var dx = event.detail.dx; + var dy = event.detail.dy; + var absDy = Math.abs(dy); if (this.rightDrawer) { - this[xDirection ? 'closeDrawer' : 'openDrawer'](); + this[xDirection ? 'closeDrawer' : 'openDrawer'](); } else { - this[xDirection ? 'openDrawer' : 'closeDrawer'](); + this[xDirection || dx > -80 || absDy >= 70 ? 'openDrawer' : 'closeDrawer'](); } } }, @@ -827,7 +836,7 @@ Custom property | Description | Default if (!focusedChildCameFromDrawer) { event.stopPropagation(); - autoFocusedNode.focus(); + //autoFocusedNode.focus(); } },