File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -146,9 +146,14 @@ export default class Controls {
146146 if ( fragmentsRoutes . prev ) this . controlsPrev . forEach ( el => { el . classList . add ( 'fragmented' , 'enabled' ) ; el . removeAttribute ( 'disabled' ) ; } ) ;
147147 if ( fragmentsRoutes . next ) this . controlsNext . forEach ( el => { el . classList . add ( 'fragmented' , 'enabled' ) ; el . removeAttribute ( 'disabled' ) ; } ) ;
148148
149+ const isVerticalStack = this . Reveal . isVerticalSlide ( currentSlide ) ;
150+ const hasVerticalSiblings = isVerticalStack &&
151+ currentSlide . parentElement &&
152+ currentSlide . parentElement . querySelectorAll ( ':scope > section' ) . length > 1 ;
153+
149154 // Apply fragment decorators to directional buttons based on
150155 // what slide axis they are in
151- if ( this . Reveal . isVerticalSlide ( currentSlide ) ) {
156+ if ( isVerticalStack && hasVerticalSiblings ) {
152157 if ( fragmentsRoutes . prev ) this . controlsUp . forEach ( el => { el . classList . add ( 'fragmented' , 'enabled' ) ; el . removeAttribute ( 'disabled' ) ; } ) ;
153158 if ( fragmentsRoutes . next ) this . controlsDown . forEach ( el => { el . classList . add ( 'fragmented' , 'enabled' ) ; el . removeAttribute ( 'disabled' ) ; } ) ;
154159 }
You can’t perform that action at this time.
0 commit comments