File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ export class Switcher {
5757 this . _windows = [ ...windows ] ;
5858 this . _modifierMask = null ;
5959 this . _currentIndex = currentIndex ;
60+ this . _lastIndex = currentIndex ;
6061 this . _haveModal = false ;
6162 this . _tracker = manager . platform . getWindowTracker ( ) ;
6263 this . _windowManager = global . window_manager ;
@@ -251,7 +252,8 @@ export class Switcher {
251252
252253 _gestureBegin ( tracker ) {
253254 const baseDistance = 400 ;
254- const progress = this . _currentIndex ;
255+ let t = this . _previews [ this . _currentIndex ] . get_transition ( 'scale-x' ) ;
256+ const progress = t !== null ? ( this . _currentIndex - this . _lastIndex ) * t . get_progress ( ) + this . _lastIndex : this . _currentIndex ; //this._currentIndex;
255257 const points = [ ] ;
256258 for ( let i = 0 ; i < this . _previews . length ; i ++ ) {
257259 points . push ( i ) ;
@@ -522,6 +524,7 @@ export class Switcher {
522524 }
523525
524526 _setCurrentIndex ( value ) {
527+ this . _lastIndex = this . _currentIndex ;
525528 this . _currentIndex = value ;
526529 }
527530
You can’t perform that action at this time.
0 commit comments