Merge branch 'master' into Pinch-Zoom-Fix
Conflicts: changelog.txt
@ -3,6 +3,7 @@ OPENSEADRAGON CHANGELOG
|
||||
|
||||
1.0.0: (in progress)
|
||||
|
||||
* BREAKING CHANGE: TileSource 'ready' event handler signature changed for consistency to 'handlerMethod( eventSource, eventData)' where eventData == { tileSource } (#239)
|
||||
* BREAKING CHANGE: Renamed EventHandler to EventSource (#225)
|
||||
* BREAKING CHANGE: MouseTracker event handler method signatures changed to 'handlerMethod( tracker, eventData)' (#23)
|
||||
* BREAKING CHANGE: Event names changed for consistency: changed to lower case, compound names hyphenated, and "on" prefixes removed (#226):
|
||||
@ -19,6 +20,8 @@ OPENSEADRAGON CHANGELOG
|
||||
* MouseTracker now supports an optional 'moveHandler' method for tracking mousemove events (#215)
|
||||
* Fixed: Element-relative mouse coordinates now correct if the element and/or page is scrolled (using new OpenSeadragon.getElementOffset() method) (#131)
|
||||
* Fixed: Pinch zoom event issue, regressive issue from previous event system changes (#244)
|
||||
* Added IIIF Image API 1.1 Tile Source (#230)
|
||||
* Fixed: Touch event issue where no canvas-click events were being raised (#240)
|
||||
|
||||
0.9.131:
|
||||
|
||||
|
@ -169,7 +169,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, {
|
||||
scale = Math.pow( 0.5, this.maxLevel - level ),
|
||||
|
||||
//## get iiif size
|
||||
iiif_size = 'pct:' + ( scale * 100 ),
|
||||
// iiif_size = 'pct:' + ( scale * 100 ),
|
||||
|
||||
//# image dimensions at this level
|
||||
level_width = Math.ceil( this.width * scale ),
|
||||
@ -182,16 +182,19 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, {
|
||||
iiif_tile_x,
|
||||
iiif_tile_y,
|
||||
iiif_tile_w,
|
||||
iiif_tile_h;
|
||||
iiif_tile_h,
|
||||
iiif_size;
|
||||
|
||||
|
||||
if ( level_width < this.tile_width && level_height < this.tile_height ){
|
||||
iiif_size = level_width + ","; // + level_height; only one dim. for IIIF level 1 compliance
|
||||
iiif_region = 'full';
|
||||
} else {
|
||||
iiif_tile_x = x * iiif_tile_size_width;
|
||||
iiif_tile_y = y * iiif_tile_size_height;
|
||||
iiif_tile_w = Math.min( iiif_tile_size_width, this.width - iiif_tile_x );
|
||||
iiif_tile_h = Math.min( iiif_tile_size_height, this.height - iiif_tile_y );
|
||||
iiif_size = Math.ceil(iiif_tile_w * scale) + ",";
|
||||
iiif_region = [ iiif_tile_x, iiif_tile_y, iiif_tile_w, iiif_tile_h ].join(',');
|
||||
}
|
||||
|
||||
|
@ -1020,7 +1020,7 @@
|
||||
function onMouseUpCaptured( tracker, event, noRelease, isTouch ) {
|
||||
isTouch = isTouch || false;
|
||||
|
||||
if ( !THIS[ tracker.hash ].insideElement ) {
|
||||
if ( !THIS[ tracker.hash ].insideElement || isTouch ) {
|
||||
onMouseUp( tracker, event, isTouch );
|
||||
}
|
||||
|
||||
|
@ -117,15 +117,8 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve
|
||||
for ( i = 0; i < arguments.length; i++ ) {
|
||||
if ( $.isFunction( arguments[ i ] ) ) {
|
||||
callback = arguments[ i ];
|
||||
// TODO Send generic object wrapping readySource as a property (breaking change)
|
||||
// TODO Maybe placeHolderSource should be passed to callback as well for consistency
|
||||
// with event handler signature?
|
||||
// Should be this (although technically it works as-is):
|
||||
//this.addHandler( 'ready', function ( placeHolderSource, placeHolderArgs ) {
|
||||
// callback( placeHolderArgs );
|
||||
//} );
|
||||
this.addHandler( 'ready', function ( placeHolderSource, readySource ) {
|
||||
callback( readySource );
|
||||
this.addHandler( 'ready', function ( placeHolderSource, placeHolderEventData ) {
|
||||
callback( placeHolderSource, placeHolderEventData );
|
||||
} );
|
||||
//only one callback per constructor
|
||||
break;
|
||||
@ -308,10 +301,7 @@ $.TileSource.prototype = {
|
||||
options = $TileSource.prototype.configure.apply( _this, [ data, url ]);
|
||||
readySource = new $TileSource( options );
|
||||
_this.ready = true;
|
||||
// TODO Send generic object wrapping readySource as a property (breaking change)
|
||||
// Should be this:
|
||||
//_this.raiseEvent( 'ready', { tileSource: readySource } );
|
||||
_this.raiseEvent( 'ready', readySource );
|
||||
_this.raiseEvent( 'ready', { tileSource: readySource } );
|
||||
};
|
||||
|
||||
if( url.match(/\.js$/) ){
|
||||
|
@ -438,8 +438,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
setTimeout(function(){
|
||||
if ( $.type( tileSource ) == 'string') {
|
||||
//If its still a string it means it must be a url at this point
|
||||
tileSource = new $.TileSource( tileSource, function( readySource ){
|
||||
openTileSource( _this, readySource );
|
||||
tileSource = new $.TileSource( tileSource, function( eventSource, eventData ){
|
||||
openTileSource( _this, eventData.tileSource );
|
||||
});
|
||||
tileSource.addHandler( 'open-failed', function ( name, args ) {
|
||||
_this.raiseEvent( 'open-failed', args );
|
||||
|
@ -1,13 +1,14 @@
|
||||
{
|
||||
"identifier": "pudl0001/4609321/s42/00000001",
|
||||
"width": 2584,
|
||||
"height": 3600,
|
||||
"identifier": "iiif_1_0_files",
|
||||
"width": 775,
|
||||
"height": 1024,
|
||||
"scale_factors": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
5,
|
||||
6
|
||||
],
|
||||
"tile_width": 256,
|
||||
"tile_height": 256,
|
||||
@ -21,6 +22,5 @@
|
||||
"grey",
|
||||
"color"
|
||||
],
|
||||
"profile": "http://library.stanford.edu/iiif/image-api/compliance.html#level1",
|
||||
"image_host": "http://lorisimg.princeton.edu/loris"
|
||||
"profile": "http://library.stanford.edu/iiif/image-api/compliance.html#level1"
|
||||
}
|
||||
|
@ -1 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><info xmlns="http://library.stanford.edu/iiif/image-api/ns/"><identifier>pudl0001/4609321/s42/00000001</identifier><width>2584</width><height>3600</height><scale_factors><scale_factor>1</scale_factor><scale_factor>2</scale_factor><scale_factor>3</scale_factor><scale_factor>4</scale_factor><scale_factor>5</scale_factor></scale_factors><tile_width>256</tile_width><tile_height>256</tile_height><formats><format>jpg</format><format>png</format></formats><qualities><quality>native</quality><quality>bitonal</quality><quality>grey</quality><quality>color</quality></qualities><profile>http://library.stanford.edu/iiif/image-api/compliance.html#level1</profile><image_host>http://lorisimg.princeton.edu/loris</image_host></info>
|
||||
<info xmlns="http://library.stanford.edu/iiif/image-api/ns/">
|
||||
<identifier>iiif_1_0_files</identifier>
|
||||
<width>775</width>
|
||||
<height>1024</height>
|
||||
<scale_factors>
|
||||
<scale_factor>1</scale_factor>
|
||||
<scale_factor>2</scale_factor>
|
||||
<scale_factor>3</scale_factor>
|
||||
<scale_factor>4</scale_factor>
|
||||
<scale_factor>5</scale_factor>
|
||||
<scale_factor>6</scale_factor>
|
||||
</scale_factors>
|
||||
<tile_width>256</tile_width>
|
||||
<tile_height>256</tile_height>
|
||||
<formats>
|
||||
<format>jpg</format>
|
||||
<format>png</format>
|
||||
</formats>
|
||||
<qualities>
|
||||
<quality>native</quality>
|
||||
<quality>bitonal</quality>
|
||||
<quality>grey</quality>
|
||||
<quality>color</quality>
|
||||
</qualities>
|
||||
<profile>http://library.stanford.edu/iiif/image-api/compliance.html#level1</profile>
|
||||
</info>
|
||||
|
@ -5,11 +5,12 @@
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
16
|
||||
16,
|
||||
32
|
||||
],
|
||||
"tile_height": 256,
|
||||
"height": 3600,
|
||||
"width": 2584,
|
||||
"height": 1024,
|
||||
"width": 775,
|
||||
"tile_width": 256,
|
||||
"qualities": [
|
||||
"native",
|
||||
@ -23,5 +24,5 @@
|
||||
"gif"
|
||||
],
|
||||
"@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json",
|
||||
"@id": "http://libimages.princeton.edu/loris/pudl0071%2F4055459%2F01%2F00000030.jp2"
|
||||
}
|
||||
"@id": "http://localhost:8000/test/data/iiif_1_1_files"
|
||||
}
|
||||
|
BIN
test/data/iiif_1_0_files/0,0,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_0_files/0,0,512,512/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
test/data/iiif_1_0_files/0,0,775,1024/194,/0/native.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
test/data/iiif_1_0_files/0,256,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,512,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,512,512,512/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,768,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/256,0,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
test/data/iiif_1_0_files/256,256,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
test/data/iiif_1_0_files/256,512,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
test/data/iiif_1_0_files/256,768,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_0_files/512,0,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_0_files/512,0,263,512/132,/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/512,256,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/iiif_1_0_files/512,512,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_0_files/512,512,263,512/132,/0/native.jpg
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
test/data/iiif_1_0_files/512,768,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/768,0,7,256/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_0_files/768,256,7,256/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 716 B |
BIN
test/data/iiif_1_0_files/768,512,7,256/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_0_files/768,768,7,256/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 712 B |
BIN
test/data/iiif_1_0_files/full/1,/0/native.jpg
Normal file
After Width: | Height: | Size: 633 B |
BIN
test/data/iiif_1_0_files/full/13,/0/native.jpg
Normal file
After Width: | Height: | Size: 810 B |
BIN
test/data/iiif_1_0_files/full/2,/0/native.jpg
Normal file
After Width: | Height: | Size: 663 B |
BIN
test/data/iiif_1_0_files/full/25,/0/native.jpg
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
test/data/iiif_1_0_files/full/4,/0/native.jpg
Normal file
After Width: | Height: | Size: 675 B |
BIN
test/data/iiif_1_0_files/full/49,/0/native.jpg
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
test/data/iiif_1_0_files/full/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 683 B |
BIN
test/data/iiif_1_0_files/full/97,/0/native.jpg
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
test/data/iiif_1_1_files/0,0,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_1_files/0,0,512,512/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
test/data/iiif_1_1_files/0,0,775,1024/194,256/0/native.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
test/data/iiif_1_1_files/0,256,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_1_files/0,512,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_1_files/0,512,512,512/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_1_files/0,768,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_1_files/256,0,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
test/data/iiif_1_1_files/256,256,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
test/data/iiif_1_1_files/256,512,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
test/data/iiif_1_1_files/256,768,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_1_files/512,0,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_1_files/512,0,263,512/132,256/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_1_files/512,256,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/iiif_1_1_files/512,512,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_1_files/512,512,263,512/132,256/0/native.jpg
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
test/data/iiif_1_1_files/512,768,256,256/256,256/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_1_files/768,0,7,256/7,256/0/native.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_1_files/768,256,7,256/7,256/0/native.jpg
Normal file
After Width: | Height: | Size: 716 B |
BIN
test/data/iiif_1_1_files/768,512,7,256/7,256/0/native.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_1_files/768,768,7,256/7,256/0/native.jpg
Normal file
After Width: | Height: | Size: 712 B |
BIN
test/data/iiif_1_1_files/full/1,1/0/native.jpg
Normal file
After Width: | Height: | Size: 633 B |
BIN
test/data/iiif_1_1_files/full/13,16/0/native.jpg
Normal file
After Width: | Height: | Size: 810 B |
BIN
test/data/iiif_1_1_files/full/2,2/0/native.jpg
Normal file
After Width: | Height: | Size: 663 B |
BIN
test/data/iiif_1_1_files/full/25,32/0/native.jpg
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
test/data/iiif_1_1_files/full/4,4/0/native.jpg
Normal file
After Width: | Height: | Size: 675 B |
BIN
test/data/iiif_1_1_files/full/49,64/0/native.jpg
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
test/data/iiif_1_1_files/full/7,8/0/native.jpg
Normal file
After Width: | Height: | Size: 683 B |
BIN
test/data/iiif_1_1_files/full/97,128/0/native.jpg
Normal file
After Width: | Height: | Size: 7.1 KiB |