mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +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 );
|
exists = tileSource.tileExists( level, xMod, yMod );
|
||||||
url = tileSource.getTileUrl( level, xMod, yMod );
|
url = tileSource.getTileUrl( level, xMod, yMod );
|
||||||
|
|
||||||
bounds.x += worldWidth * ( x - xMod ) / numTiles.x;
|
bounds.x += ( x - xMod ) / numTiles.x;
|
||||||
bounds.y += worldHeight * ( y - yMod ) / numTiles.y;
|
bounds.y += (worldHeight / worldWidth) * (( y - yMod ) / numTiles.y);
|
||||||
|
|
||||||
tilesMatrix[ level ][ x ][ y ] = new $.Tile(
|
tilesMatrix[ level ][ x ][ y ] = new $.Tile(
|
||||||
level,
|
level,
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
debugMode: true,
|
debugMode: true,
|
||||||
zoomPerScroll: 1.02,
|
zoomPerScroll: 1.02,
|
||||||
showNavigator: testNavigator,
|
showNavigator: testNavigator,
|
||||||
wrapHorizontal: true,
|
// wrapHorizontal: true,
|
||||||
wrapVertical: true,
|
// wrapVertical: true,
|
||||||
id: "contentDiv",
|
id: "contentDiv",
|
||||||
prefixUrl: "../../../build/openseadragon/images/"
|
prefixUrl: "../../../build/openseadragon/images/"
|
||||||
};
|
};
|
||||||
@ -96,7 +96,9 @@
|
|||||||
this.viewer.addHandler('open', function() {
|
this.viewer.addHandler('open', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.viewer.open("../../data/testpattern.dzi");
|
this.viewer.open({
|
||||||
|
tileSource: "../../data/testpattern.dzi"
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
@ -133,15 +135,14 @@
|
|||||||
// ----------
|
// ----------
|
||||||
crossTest2: function() {
|
crossTest2: function() {
|
||||||
this.viewer.open([
|
this.viewer.open([
|
||||||
// {
|
{
|
||||||
// tileSource: "../../data/tall.dzi",
|
tileSource: "../../data/tall.dzi",
|
||||||
// x: 1.5,
|
x: 1.5,
|
||||||
// y: 0,
|
y: 0,
|
||||||
// width: 1
|
width: 1
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
tileSource: '../../data/wide.dzi',
|
tileSource: '../../data/wide.dzi',
|
||||||
opacity: 1,
|
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 1.5,
|
y: 1.5,
|
||||||
height: 1
|
height: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user