From c9708399a1bcf44c9f28719fb3af9991818fbf50 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Fri, 19 Dec 2014 15:32:19 -0800 Subject: [PATCH] Fixed bug with passing single literal tilesource on construction --- src/viewer.js | 2 +- test/demo/collections/main.js | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 00108538..c6b373a4 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -496,7 +496,7 @@ $.Viewer = function( options ) { } // Open initial tilesources - if ( this.tileSources && this.tileSources.length) { + if (this.tileSources) { this.open( this.tileSources ); } diff --git a/test/demo/collections/main.js b/test/demo/collections/main.js index 173aa2e6..a792131d 100644 --- a/test/demo/collections/main.js +++ b/test/demo/collections/main.js @@ -9,7 +9,7 @@ var testInitialOpen = true; var testOverlays = false; var testMargins = false; - var testNavigator = true; + var testNavigator = false; var margins; var config = { @@ -22,8 +22,8 @@ // referenceStripScroll: 'vertical', navPrevNextWrap: false, preserveViewport: false, - collectionMode: true, - collectionRows: 1, + // collectionMode: true, + // collectionRows: 1, // collectionLayout: 'vertical', // collectionTileSize: 10, // collectionTileMargin: 10, @@ -33,6 +33,20 @@ prefixUrl: "../../../build/openseadragon/images/" }; + var highsmith = { + Image: { + xmlns: "http://schemas.microsoft.com/deepzoom/2008", + Url: "http://openseadragon.github.io/example-images/highsmith/highsmith_files/", + Format: "jpg", + Overlap: "2", + TileSize: "256", + Size: { + Height: "9221", + Width: "7026" + } + } + }; + if (testInitialOpen) { config.tileSources = [ { @@ -55,6 +69,8 @@ height: 1 } ]; + + // config.tileSources = highsmith; } if (testOverlays) {