Wraparound now works for images of other widths than 1

This commit is contained in:
Ian Gilman 2014-11-05 15:24:31 -08:00
parent e52e2fef34
commit a9c9478752
2 changed files with 13 additions and 12 deletions

View File

@ -545,8 +545,8 @@ function getTile( x, y, level, tileSource, tilesMatrix, time, numTiles, worldWid
exists = tileSource.tileExists( level, xMod, yMod );
url = tileSource.getTileUrl( level, xMod, yMod );
bounds.x += worldWidth * ( x - xMod ) / numTiles.x;
bounds.y += worldHeight * ( y - yMod ) / numTiles.y;
bounds.x += ( x - xMod ) / numTiles.x;
bounds.y += (worldHeight / worldWidth) * (( y - yMod ) / numTiles.y);
tilesMatrix[ level ][ x ][ y ] = new $.Tile(
level,

View File

@ -16,8 +16,8 @@
debugMode: true,
zoomPerScroll: 1.02,
showNavigator: testNavigator,
wrapHorizontal: true,
wrapVertical: true,
// wrapHorizontal: true,
// wrapVertical: true,
id: "contentDiv",
prefixUrl: "../../../build/openseadragon/images/"
};
@ -96,7 +96,9 @@
this.viewer.addHandler('open', function() {
});
this.viewer.open("../../data/testpattern.dzi");
this.viewer.open({
tileSource: "../../data/testpattern.dzi"
});
},
// ----------
@ -133,15 +135,14 @@
// ----------
crossTest2: function() {
this.viewer.open([
// {
// tileSource: "../../data/tall.dzi",
// x: 1.5,
// y: 0,
// width: 1
// },
{
tileSource: "../../data/tall.dzi",
x: 1.5,
y: 0,
width: 1
},
{
tileSource: '../../data/wide.dzi',
opacity: 1,
x: 0,
y: 1.5,
height: 1