Fixed drawer, renamed source, fixed tests

This commit is contained in:
Rob Sanderson 2014-07-28 11:53:06 -07:00
parent 2c4440b5a2
commit 984fb8c531
11 changed files with 9 additions and 10 deletions

View File

@ -33,7 +33,7 @@ module.exports = function(grunt) {
//"src/profiler.js",
"src/tilesource.js",
"src/dzitilesource.js",
"src/iiifmultitilesource.js",
"src/iiiftilesource.js",
"src/osmtilesource.js",
"src/tmstilesource.js",
"src/legacytilesource.js",

View File

@ -750,11 +750,10 @@ function onTileLoad( drawer, tile, time, image ) {
tile.loaded = true;
tile.image = image;
insertionIndex = drawer.tilesLoaded.length;
if ( drawer.tilesLoaded.length >= drawer.maxImageCacheCount ) {
cutoff = Math.ceil( Math.log( drawer.source.tileSize ) / Math.log( 2 ) );
cutoff = Math.ceil( Math.log( drawer.source.getTileSize(tile.level) ) / Math.log( 2 ) );
worstTile = null;
worstTileIndex = -1;

View File

@ -72,37 +72,37 @@
// ----------
asyncTest('IIIF 1.0 JSON', function() {
testOpen('iiif1_0.json');
testOpen('iiif_1_0_files/info.json');
});
// ----------
asyncTest('IIIF 1.0 XML', function() {
testOpen('iiif1_0.xml');
testOpen('iiif_1_0_files/info.xml');
});
// ----------
asyncTest('IIIF 1.1 JSON', function() {
testOpen('iiif_1_1_tiled.json');
testOpen('iiif_1_1_tiled/info.json');
});
// ----------
asyncTest('IIIF No Tiles, Less than 256', function() {
testOpen('iiif_1_1_no_tiles_255.json');
testOpen('iiif_1_1_no_tiles_255/info.json');
});
// ----------
asyncTest('IIIF No Tiles, Bet. 256 and 512', function() {
testOpen('iiif_1_1_no_tiles_384.json');
testOpen('iiif_1_1_no_tiles_384/info.json');
});
// ----------
asyncTest('IIIF No Tiles, Bet. 512 and 1024', function() {
testOpen('iiif_1_1_no_tiles_768.json');
testOpen('iiif_1_1_no_tiles_768/info.json');
});
// ----------
asyncTest('IIIF No Tiles, Larger than 1024', function() {
testOpen('iiif_1_1_no_tiles_1048.json');
testOpen('iiif_1_1_no_tiles_1048/info.json');
});
})();