openseadragon/openseadragon — pull request #132 by mhellfeuer (2013-06-18 19:04:53+00:00)
Title: Problem with Viewer.open methhod

I hold a tilesource collection in a variable:

var docFile = new Array (
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/1.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/2.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/3.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/4.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/5.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/6.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/7.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/8.dzi",
"/render/588a9ee5-6ae4-4500-8c99-17877b78e632/9.dzi"
);

If I initialize the Viewer it works, if I use the open-method later I get an error in:

resetContentSize: function( contentSize ){
this.contentSize = contentSize;
--> this.contentAspectX = this.contentSize.x / this.contentSize.y;

work:
var Viewer = OpenSeadragon({
id: "Viewer",
immediateRender: true,
navigatorSizeRatio: 0.25,
prefixUrl: "openseadragon/images/",
wrapHorizontal: false,
tileSources: docFile
});

doesn't work:
Viewer.open(docFile);

What do I make wrong?