@@ -56,7 +56,6 @@ function Viewer(viewerPlugin, parameters) {
56
56
presentationMode = false ,
57
57
isFullScreen = false ,
58
58
initialized = false ,
59
- isSlideshow = false ,
60
59
url ,
61
60
viewerElement = document . getElementById ( 'viewer' ) ,
62
61
canvasContainer = document . getElementById ( 'canvasContainer' ) ,
@@ -277,8 +276,7 @@ function Viewer(viewerPlugin, parameters) {
277
276
viewerPlugin . onLoad = function ( ) {
278
277
document . getElementById ( 'pluginVersion' ) . innerHTML = viewerPlugin . getPluginVersion ( ) ;
279
278
280
- isSlideshow = viewerPlugin . isSlideshow ( ) ;
281
- if ( isSlideshow ) {
279
+ if ( viewerPlugin . isSlideshow ( ) ) {
282
280
// Slideshow pages should be centered
283
281
canvasContainer . classList . add ( "slideshow" ) ;
284
282
// Show page nav controls only for presentations
@@ -398,7 +396,6 @@ function Viewer(viewerPlugin, parameters) {
398
396
titlebar . style . display = toolbar . style . display = 'none' ;
399
397
overlayCloseButton . style . display = 'block' ;
400
398
canvasContainer . classList . add ( 'presentationMode' ) ;
401
- isSlideshow = true ;
402
399
canvasContainer . onmousedown = function ( event ) {
403
400
event . preventDefault ( ) ;
404
401
} ;
@@ -425,7 +422,6 @@ function Viewer(viewerPlugin, parameters) {
425
422
canvasContainer . oncontextmenu = function ( ) { } ;
426
423
canvasContainer . onmousedown = function ( ) { } ;
427
424
parseScale ( 'auto' ) ;
428
- isSlideshow = viewerPlugin . isSlideshow ( ) ;
429
425
}
430
426
431
427
presentationMode = ! presentationMode ;
@@ -482,7 +478,7 @@ function Viewer(viewerPlugin, parameters) {
482
478
}
483
479
484
480
function showOverlayNavigator ( ) {
485
- if ( isSlideshow ) {
481
+ if ( presentationMode || viewerPlugin . isSlideshow ( ) ) {
486
482
overlayNavigator . className = 'viewer-touched' ;
487
483
window . clearTimeout ( touchTimer ) ;
488
484
touchTimer = window . setTimeout ( function ( ) {
0 commit comments