mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
added test for 1.1; renamed 11 to 1_1
This commit is contained in:
parent
1a52656ed6
commit
e4bd874b03
@ -34,7 +34,7 @@ module.exports = function(grunt) {
|
||||
"src/tilesource.js",
|
||||
"src/dzitilesource.js",
|
||||
"src/iiiftilesource.js",
|
||||
"src/iiif11tilesource.js",
|
||||
"src/iiif1_1tilesource.js",
|
||||
"src/osmtilesource.js",
|
||||
"src/tmstilesource.js",
|
||||
"src/legacytilesource.js",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* OpenSeadragon - IIIF11TileSource
|
||||
* OpenSeadragon - IIIF1_1TileSource
|
||||
*
|
||||
* Copyright (C) 2009 CodePlex Foundation
|
||||
* Copyright (C) 2010-2013 OpenSeadragon contributors
|
||||
@ -43,7 +43,7 @@
|
||||
* @extends OpenSeadragon.TileSource
|
||||
* @see http://library.stanford.edu/iiif/image-api/
|
||||
*/
|
||||
$.IIIF11TileSource = function( options ){
|
||||
$.IIIF1_1TileSource = function( options ){
|
||||
|
||||
$.extend( true, this, options );
|
||||
|
||||
@ -69,12 +69,12 @@ $.IIIF11TileSource = function( options ){
|
||||
$.TileSource.apply( this, [ options ] );
|
||||
};
|
||||
|
||||
$.extend( $.IIIF11TileSource.prototype, $.TileSource.prototype, {
|
||||
$.extend( $.IIIF1_1TileSource.prototype, $.TileSource.prototype, {
|
||||
/**
|
||||
* Determine if the data and/or url imply the image service is supported by
|
||||
* this tile source.
|
||||
* @function
|
||||
* @name OpenSeadragon.IIIF11TileSource.prototype.supports
|
||||
* @name OpenSeadragon.IIIF1_1TileSource.prototype.supports
|
||||
* @param {Object|Array} data
|
||||
* @param {String} optional - url
|
||||
*/
|
||||
@ -91,7 +91,7 @@ $.extend( $.IIIF11TileSource.prototype, $.TileSource.prototype, {
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @name OpenSeadragon.IIIF11TileSource.prototype.configure
|
||||
* @name OpenSeadragon.IIIF1_1TileSource.prototype.configure
|
||||
* @param {Object} data - the raw configuration
|
||||
*/
|
||||
// IIIF 1.1 Info Looks like this (XML syntax is no more):
|
||||
@ -114,7 +114,7 @@ $.extend( $.IIIF11TileSource.prototype, $.TileSource.prototype, {
|
||||
* Responsible for retreiving the url which will return an image for the
|
||||
* region specified by the given x, y, and level components.
|
||||
* @function
|
||||
* @name OpenSeadragon.IIIF11TileSource.prototype.getTileUrl
|
||||
* @name OpenSeadragon.IIIF1_1TileSource.prototype.getTileUrl
|
||||
* @param {Number} level - z index
|
||||
* @param {Number} x
|
||||
* @param {Number} y
|
27
test/data/iiif1_1.json
Normal file
27
test/data/iiif1_1.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"profile": "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",
|
||||
"scale_factors": [
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"tile_height": 256,
|
||||
"height": 3600,
|
||||
"width": 2584,
|
||||
"tile_width": 256,
|
||||
"qualities": [
|
||||
"native",
|
||||
"bitonal",
|
||||
"grey",
|
||||
"color"
|
||||
],
|
||||
"formats": [
|
||||
"jpg",
|
||||
"png",
|
||||
"gif"
|
||||
],
|
||||
"@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json",
|
||||
"@id": "http://libimages.princeton.edu/loris/pudl0071%2F4055459%2F01%2F00000030.jp2"
|
||||
}
|
@ -65,4 +65,11 @@
|
||||
testOpen('testpattern.xml');
|
||||
});
|
||||
|
||||
// ----------
|
||||
asyncTest('IIIF 1.1 JSON', function() {
|
||||
testOpen('iiif1_1.json');
|
||||
});
|
||||
|
||||
|
||||
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user