From cc18a85591b46aea2ca4daf268862a5641c50dbd Mon Sep 17 00:00:00 2001 From: edsilv Date: Sat, 21 Feb 2015 12:00:21 +0000 Subject: [PATCH] when reloading, viewerSize is being set to 0, 0. check that x and y have a non-zero value, otherwise results in IE8 error when rounding NaN --- src/navigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/navigator.js b/src/navigator.js index 23809e9d..9f3923df 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -282,7 +282,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* bottomright; viewerSize = $.getElementSize( this.viewer.element ); - if ( this._resizeWithViewer && !viewerSize.equals( this.oldViewerSize ) ) { + if ( this._resizeWithViewer && viewerSize.x && viewerSize.y && !viewerSize.equals( this.oldViewerSize ) ) { this.oldViewerSize = viewerSize; if ( this.maintainSizeRatio || !this.elementArea) {