mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Wraparound now works for images of other widths than 1
This commit is contained in:
parent
e52e2fef34
commit
a9c9478752
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user