diff --git a/src/navigator.js b/src/navigator.js
index 2cadc03f..e320fb68 100644
--- a/src/navigator.js
+++ b/src/navigator.js
@@ -309,16 +309,22 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
         viewerSize = $.getElementSize( this.viewer.element );
         if ( !viewerSize.equals( this.oldViewerSize ) ) {
             this.oldViewerSize = viewerSize;
-            if ( this.maintainSizeRatio ) {
+
+            if ( this.maintainSizeRatio || !this.elementArea) {
                 newWidth  = viewerSize.x * this.sizeRatio;
                 newHeight = viewerSize.y * this.sizeRatio;
-            }
-            else {
+            } else {
                 newWidth = Math.sqrt(this.elementArea * (viewerSize.x / viewerSize.y));
                 newHeight = this.elementArea / newWidth;
             }
+
             this.element.style.width  = Math.round( newWidth ) + 'px';
             this.element.style.height = Math.round( newHeight ) + 'px';
+
+            if (!this.elementArea) {
+                this.elementArea = newWidth * newHeight;
+            }
+
             this.updateSize();
         }