From 1159711e264bc84aebe7518c9a3bf603d051e00c Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Mon, 10 Nov 2014 16:25:17 -0800 Subject: [PATCH] Fixed broken navigator unit test --- src/navigator.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/navigator.js b/src/navigator.js index e320fb68..5f1767cc 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -191,7 +191,10 @@ $.Navigator = function( options ){ options.controlOptions ); - if ( options.controlOptions.anchor != $.ControlAnchor.ABSOLUTE && options.controlOptions.anchor != $.ControlAnchor.NONE ) { + this._resizeWithViewer = options.controlOptions.anchor != $.ControlAnchor.ABSOLUTE && + options.controlOptions.anchor != $.ControlAnchor.NONE; + + if ( this._resizeWithViewer ) { if ( options.width && options.height ) { this.element.style.height = typeof ( options.height ) == "number" ? ( options.height + 'px' ) : options.height; this.element.style.width = typeof ( options.width ) == "number" ? ( options.width + 'px' ) : options.width; @@ -307,7 +310,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* bottomright; viewerSize = $.getElementSize( this.viewer.element ); - if ( !viewerSize.equals( this.oldViewerSize ) ) { + if ( this._resizeWithViewer && !viewerSize.equals( this.oldViewerSize ) ) { this.oldViewerSize = viewerSize; if ( this.maintainSizeRatio || !this.elementArea) {