File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
327
327
return ;
328
328
}
329
329
330
+ console . log ( event ) ;
331
+
330
332
const direction = this . naturalScroll ? - 1 : 1 ;
331
333
// event is forward or back
332
334
switch ( event . command ) {
@@ -472,19 +474,17 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
472
474
}
473
475
474
476
async _handleSwipeEnd ( event ) {
475
- if ( ! this . workspaceEnabled || ! this . _swipeState ?. isGestureActive ) return ;
477
+ console . log ( event , this . _swipeState ) ;
478
+
479
+ if ( ! this . workspaceEnabled ) return ;
476
480
event . preventDefault ( ) ;
477
481
event . stopPropagation ( ) ;
478
482
const isRTL = document . documentElement . matches ( ':-moz-locale-dir(rtl)' ) ;
479
- const moveForward = ( this . _swipeState . direction === 'right' ) !== isRTL ;
483
+ const moveForward = ( event . direction === SimpleGestureEvent . DIRECTION_RIGHT ) !== isRTL ;
480
484
481
- let rawDirection = moveForward ? 1 : - 1 ;
482
- if ( this . _swipeState . direction ) {
483
- let direction = this . naturalScroll ? - 1 : 1 ;
484
- this . changeWorkspaceShortcut ( rawDirection * direction , true ) ;
485
- } else {
486
- this . _cancelSwipeAnimation ( ) ;
487
- }
485
+ const rawDirection = moveForward ? 1 : - 1 ;
486
+ const direction = this . naturalScroll ? - 1 : 1 ;
487
+ this . changeWorkspaceShortcut ( rawDirection * direction , true ) ;
488
488
489
489
// Reset swipe state
490
490
this . _swipeState = {
You can’t perform that action at this time.
0 commit comments