Dropping irregularly shaped edge tiles
See original GitHub issueHi all- there’s an edge case that causes unexpected behavior in builds from the master branch after TileSource :getTileAtPoint was changed on July 29. Reverting those changes to getTileAtPoint
are enough to eliminate the unexpected behaviors. Those changes were originally made in pull request 987 in response to issue 555.
If the tileSource
height and width are not integer multiples of the tileSource tileSize
, each right or bottom edge Tile
loads with height and/or width less than tileSize
. This is the correct expected behavior. After the July 29 fix, however, zooming the viewport inward toward any right or bottom edge Tile
causes the tileSize
-sized upper-left tiles to disappear completely.
For my custom tileSource
of tileSize: 512
, the error happens both for height and width 520 or 1250, but but not for 512 or 1024. The error only happens if the tileSize
is not a factor of the height or width.
Here is my custom tileSource:getTileUrl
function create_ts(z) {
return {
height: g_height,
width: g_width,
tileSize: 512,
minLevel: 0,
maxLevel: Math.ceil(Math.log2(g_width/512)),
getTileUrl: function( level, x, y ){
return "http://" + server_name + "/data/?datapath=" + data_path +
"&start=" + x*512 + "," + y*512 + "," + z + "&mip=" + (this.maxLevel - level) +
"&size=" + 512 + "," + 512 + ",1";
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
I made yet another change to
getTileAtPoint
in #1006: https://github.com/openseadragon/openseadragon/pull/1006/files#diff-ed844244d3e5dcb6dfd56445d430efdaL347 Would you mind testing this implementation?@thejohnhoffer Can you verify?
I’ll close this issue assuming it’s good, but if you find a regression we can open it again.