This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 2 files changed +28
-4
lines changed
2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,19 @@ polyfill-next-selector { content: '#main > [main]'; }
92
92
transition : opacity ease-in-out 0.38s , visibility ease-in-out 0.38s ;
93
93
}
94
94
95
+ # edgeSwipeOverlay {
96
+ position : absolute;
97
+ top : 0 ;
98
+ bottom : 0 ;
99
+ left : 0 ;
100
+ width : 20px ;
101
+ }
102
+
103
+ .right-drawer > # main > # edgeSwipeOverlay {
104
+ right : 0 ;
105
+ left : auto;
106
+ }
107
+
95
108
/*
96
109
narrow layout
97
110
*/
Original file line number Diff line number Diff line change 90
90
< div id ="main " _style ="left: {{ narrow || rightDrawer ? '0' : drawerWidth }}; right: {{ rightDrawer ? (narrow ? '' : drawerWidth) : '' }}; ">
91
91
< content select ="[main] "> </ content >
92
92
< div id ="scrim " on-tap ="{{togglePanel}} "> </ div >
93
+ < div id ="edgeSwipeOverlay " hidden? ="{{!narrow || disableEdgeSwipe}} "> </ div >
93
94
</ div >
94
95
95
96
< div id ="drawer " _style ="width: {{ drawerWidth }} ">
199
200
* @type boolean
200
201
* @default false
201
202
*/
202
- forceNarrow : false
203
+ forceNarrow : false ,
204
+
205
+ /**
206
+ * If true, swipe from the edge is disable.
207
+ *
208
+ * @attribute disableEdgeSwipe
209
+ * @type boolean
210
+ * @default false
211
+ */
212
+ disableEdgeSwipe : false
203
213
} ,
204
214
205
215
eventDelegates : {
327
337
} ,
328
338
329
339
isEdgeTouch : function ( e ) {
330
- return this . swipeAllowed ( ) && ( this . rightDrawer ?
331
- e . pageX >= this . offsetWidth - this . edgeSwipeSensitivity :
332
- e . pageX <= this . edgeSwipeSensitivity ) ;
340
+ return ! this . disableEdgeSwipe && this . swipeAllowed ( ) &&
341
+ ( this . rightDrawer ?
342
+ e . pageX >= this . offsetWidth - this . edgeSwipeSensitivity :
343
+ e . pageX <= this . edgeSwipeSensitivity ) ;
333
344
} ,
334
345
335
346
trackStart : function ( e ) {
You can’t perform that action at this time.
0 commit comments