@@ -56,7 +56,6 @@ function Viewer(viewerPlugin, parameters) {
5656 presentationMode = false ,
5757 isFullScreen = false ,
5858 initialized = false ,
59- isSlideshow = false ,
6059 url ,
6160 viewerElement = document . getElementById ( 'viewer' ) ,
6261 canvasContainer = document . getElementById ( 'canvasContainer' ) ,
@@ -277,8 +276,7 @@ function Viewer(viewerPlugin, parameters) {
277276 viewerPlugin . onLoad = function ( ) {
278277 document . getElementById ( 'pluginVersion' ) . innerHTML = viewerPlugin . getPluginVersion ( ) ;
279278
280- isSlideshow = viewerPlugin . isSlideshow ( ) ;
281- if ( isSlideshow ) {
279+ if ( viewerPlugin . isSlideshow ( ) ) {
282280 // Slideshow pages should be centered
283281 canvasContainer . classList . add ( "slideshow" ) ;
284282 // Show page nav controls only for presentations
@@ -398,7 +396,6 @@ function Viewer(viewerPlugin, parameters) {
398396 titlebar . style . display = toolbar . style . display = 'none' ;
399397 overlayCloseButton . style . display = 'block' ;
400398 canvasContainer . classList . add ( 'presentationMode' ) ;
401- isSlideshow = true ;
402399 canvasContainer . onmousedown = function ( event ) {
403400 event . preventDefault ( ) ;
404401 } ;
@@ -425,7 +422,6 @@ function Viewer(viewerPlugin, parameters) {
425422 canvasContainer . oncontextmenu = function ( ) { } ;
426423 canvasContainer . onmousedown = function ( ) { } ;
427424 parseScale ( 'auto' ) ;
428- isSlideshow = viewerPlugin . isSlideshow ( ) ;
429425 }
430426
431427 presentationMode = ! presentationMode ;
@@ -482,7 +478,7 @@ function Viewer(viewerPlugin, parameters) {
482478 }
483479
484480 function showOverlayNavigator ( ) {
485- if ( isSlideshow ) {
481+ if ( presentationMode || viewerPlugin . isSlideshow ( ) ) {
486482 overlayNavigator . className = 'viewer-touched' ;
487483 window . clearTimeout ( touchTimer ) ;
488484 touchTimer = window . setTimeout ( function ( ) {
0 commit comments