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 f4cb1fb6ee..4fa6ab424c 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 @@ -368,6 +368,7 @@ To change the drawer container when it's in the right side: */ openDrawer: function() { this.selected = 'drawer'; + this.fire('paper-drawer-panel-open'); }, /** @@ -376,7 +377,8 @@ To change the drawer container when it's in the right side: * @method closeDrawer */ closeDrawer: function() { - this.selected = 'main'; + this.selected = 'main'; + this.fire('paper-drawer-panel-close'); }, ready: function() { @@ -554,6 +556,13 @@ To change the drawer container when it's in the right side: 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)); } }, @@ -567,10 +576,13 @@ To change the drawer container when it's in the right side: 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'](); } } }, diff --git a/dashboard-ui/bower_components/polymer/polymer.html b/dashboard-ui/bower_components/polymer/polymer.html index 8c71b494ba..05d3db7f42 100644 --- a/dashboard-ui/bower_components/polymer/polymer.html +++ b/dashboard-ui/bower_components/polymer/polymer.html @@ -568,7 +568,8 @@ prevent = dy > dx; prevent = dx > dy; } if (prevent) { -ev.preventDefault(); +//This breaks scrolling in safari +//ev.preventDefault(); } } }, diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html index 7399e795a8..d9267a0888 100644 --- a/dashboard-ui/vulcanize-out.html +++ b/dashboard-ui/vulcanize-out.html @@ -2516,7 +2516,8 @@ prevent = dy > dx; prevent = dx > dy; } if (prevent) { -ev.preventDefault(); +//This breaks scrolling in safari +//ev.preventDefault(); } } }, @@ -14923,6 +14924,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { */ openDrawer: function() { this.selected = 'drawer'; + this.fire('paper-drawer-panel-open'); }, /** @@ -14931,7 +14933,8 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { * @method closeDrawer */ closeDrawer: function() { - this.selected = 'main'; + this.selected = 'main'; + this.fire('paper-drawer-panel-close'); }, ready: function() { @@ -15109,6 +15112,13 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { 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)); } }, @@ -15122,10 +15132,13 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { 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'](); } } },