From ec71a4416eb9a43fdab571eb1860c6a30301dd69 Mon Sep 17 00:00:00 2001 From: Sharpbarb Date: Tue, 8 Oct 2013 15:01:28 -0700 Subject: [PATCH] Update viewer.js --- src/viewer.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index ecd8560f..88b20db0 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -200,12 +200,14 @@ $.Viewer = function( options ) { if( this.tileSources.length > 1 ){ THIS[ this.hash ].sequenced = true; } - initialTileSource = this.tileSources[ 0 ]; + initialTileSource = this.tileSources[ this.initialPage ]; + this.goToPage( this.initialPage ); } else { initialTileSource = this.tileSources; + this.open( initialTileSource ); } - this.open( initialTileSource ); + } this.element = this.element || document.getElementById( this.id ); @@ -1066,7 +1068,10 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, } return this; }, - + + currentPage: function () { + return THIS[ this.hash ].sequence; + }, /** * @function