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

This commit is contained in:
edsilv 2015-02-21 12:00:21 +00:00
parent a5394c62f7
commit cc18a85591

View File

@ -282,7 +282,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
bottomright; bottomright;
viewerSize = $.getElementSize( this.viewer.element ); 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; this.oldViewerSize = viewerSize;
if ( this.maintainSizeRatio || !this.elementArea) { if ( this.maintainSizeRatio || !this.elementArea) {