File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -536,13 +536,17 @@ function checkTocStyle() {
536536 var affixLeftMargin = ( ui . toc . affix . outerWidth ( ) - ui . toc . affix . width ( ) ) / 2 ;
537537 var left = ui . area . markdown . offset ( ) . left + ui . area . markdown . outerWidth ( ) - affixLeftMargin ;
538538 ui . toc . affix . css ( 'left' , left + 'px' ) ;
539+ ui . toc . affix . css ( 'width' , rightMargin + 'px' ) ;
539540 } else {
540541 newbool = false ;
541542 }
542543 //toc scrollspy
543544 ui . toc . toc . removeClass ( 'scrollspy-body, scrollspy-view' ) ;
544545 ui . toc . affix . removeClass ( 'scrollspy-body, scrollspy-view' ) ;
545- if ( currentMode != modeType . both && ! newbool ) {
546+ if ( currentMode == modeType . both ) {
547+ ui . toc . toc . addClass ( 'scrollspy-view' ) ;
548+ ui . toc . affix . addClass ( 'scrollspy-view' ) ;
549+ } else if ( currentMode != modeType . both && ! newbool ) {
546550 ui . toc . toc . addClass ( 'scrollspy-body' ) ;
547551 ui . toc . affix . addClass ( 'scrollspy-body' ) ;
548552 } else {
You can’t perform that action at this time.
0 commit comments