mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Merge branch 'master' of github.com:thatcher/openseadragon
This commit is contained in:
commit
9fc4388ac9
@ -222,8 +222,8 @@
|
|||||||
* position. If preserveViewport is set to true, then the viewport position
|
* position. If preserveViewport is set to true, then the viewport position
|
||||||
* is preserved when navigating between images in the sequence.
|
* is preserved when navigating between images in the sequence.
|
||||||
*
|
*
|
||||||
* @param {String} [options.prefixUrl='']
|
* @param {String} [options.prefixUrl='/images/']
|
||||||
* Appends the prefixUrl to navImages paths, which is very useful
|
* Prepends the prefixUrl to navImages paths, which is very useful
|
||||||
* since the default paths are rarely useful for production
|
* since the default paths are rarely useful for production
|
||||||
* environments.
|
* environments.
|
||||||
*
|
*
|
||||||
@ -527,43 +527,43 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
|
||||||
//INTERFACE RESOURCE SETTINGS
|
//INTERFACE RESOURCE SETTINGS
|
||||||
prefixUrl: null,
|
prefixUrl: "/images/",
|
||||||
navImages: {
|
navImages: {
|
||||||
zoomIn: {
|
zoomIn: {
|
||||||
REST: '/images/zoomin_rest.png',
|
REST: 'zoomin_rest.png',
|
||||||
GROUP: '/images/zoomin_grouphover.png',
|
GROUP: 'zoomin_grouphover.png',
|
||||||
HOVER: '/images/zoomin_hover.png',
|
HOVER: 'zoomin_hover.png',
|
||||||
DOWN: '/images/zoomin_pressed.png'
|
DOWN: 'zoomin_pressed.png'
|
||||||
},
|
},
|
||||||
zoomOut: {
|
zoomOut: {
|
||||||
REST: '/images/zoomout_rest.png',
|
REST: 'zoomout_rest.png',
|
||||||
GROUP: '/images/zoomout_grouphover.png',
|
GROUP: 'zoomout_grouphover.png',
|
||||||
HOVER: '/images/zoomout_hover.png',
|
HOVER: 'zoomout_hover.png',
|
||||||
DOWN: '/images/zoomout_pressed.png'
|
DOWN: 'zoomout_pressed.png'
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
REST: '/images/home_rest.png',
|
REST: 'home_rest.png',
|
||||||
GROUP: '/images/home_grouphover.png',
|
GROUP: 'home_grouphover.png',
|
||||||
HOVER: '/images/home_hover.png',
|
HOVER: 'home_hover.png',
|
||||||
DOWN: '/images/home_pressed.png'
|
DOWN: 'home_pressed.png'
|
||||||
},
|
},
|
||||||
fullpage: {
|
fullpage: {
|
||||||
REST: '/images/fullpage_rest.png',
|
REST: 'fullpage_rest.png',
|
||||||
GROUP: '/images/fullpage_grouphover.png',
|
GROUP: 'fullpage_grouphover.png',
|
||||||
HOVER: '/images/fullpage_hover.png',
|
HOVER: 'fullpage_hover.png',
|
||||||
DOWN: '/images/fullpage_pressed.png'
|
DOWN: 'fullpage_pressed.png'
|
||||||
},
|
},
|
||||||
previous: {
|
previous: {
|
||||||
REST: '/images/previous_rest.png',
|
REST: 'previous_rest.png',
|
||||||
GROUP: '/images/previous_grouphover.png',
|
GROUP: 'previous_grouphover.png',
|
||||||
HOVER: '/images/previous_hover.png',
|
HOVER: 'previous_hover.png',
|
||||||
DOWN: '/images/previous_pressed.png'
|
DOWN: 'previous_pressed.png'
|
||||||
},
|
},
|
||||||
next: {
|
next: {
|
||||||
REST: '/images/next_rest.png',
|
REST: 'next_rest.png',
|
||||||
GROUP: '/images/next_grouphover.png',
|
GROUP: 'next_grouphover.png',
|
||||||
HOVER: '/images/next_hover.png',
|
HOVER: 'next_hover.png',
|
||||||
DOWN: '/images/next_pressed.png'
|
DOWN: 'next_pressed.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -4916,8 +4916,12 @@ $.extend( $.Navigator.prototype, $.EventHandler.prototype, $.Viewer.prototype, {
|
|||||||
|
|
||||||
style.top = topleft.y + 'px';
|
style.top = topleft.y + 'px';
|
||||||
style.left = topleft.x + 'px';
|
style.left = topleft.x + 'px';
|
||||||
style.width = ( Math.abs( topleft.x - bottomright.x ) - 3 ) + 'px';
|
|
||||||
style.height = ( Math.abs( topleft.y - bottomright.y ) - 3 ) + 'px';
|
var width = Math.abs( topleft.x - bottomright.x ) - 3; // TODO: What's this magic number mean?
|
||||||
|
var height = Math.abs( topleft.y - bottomright.y ) - 3;
|
||||||
|
// make sure width and height are non-negative so IE doesn't throw
|
||||||
|
style.width = Math.max( width, 0 ) + 'px';
|
||||||
|
style.height = Math.max( height, 0 ) + 'px';
|
||||||
|
|
||||||
}( this.displayRegion.style ));
|
}( this.displayRegion.style ));
|
||||||
}
|
}
|
||||||
@ -4993,6 +4997,7 @@ function onCanvasScroll( tracker, position, scroll, shift ) {
|
|||||||
|
|
||||||
|
|
||||||
}( OpenSeadragon ));
|
}( OpenSeadragon ));
|
||||||
|
|
||||||
(function( $ ){
|
(function( $ ){
|
||||||
|
|
||||||
//TODO: I guess this is where the i18n needs to be reimplemented. I'll look
|
//TODO: I guess this is where the i18n needs to be reimplemented. I'll look
|
||||||
@ -5665,7 +5670,7 @@ $.DziTileSource = function( width, height, tileSize, tileOverlap, tilesUrl, file
|
|||||||
tileOverlap: arguments[ 3 ],
|
tileOverlap: arguments[ 3 ],
|
||||||
tilesUrl: arguments[ 4 ],
|
tilesUrl: arguments[ 4 ],
|
||||||
fileFormat: arguments[ 5 ],
|
fileFormat: arguments[ 5 ],
|
||||||
dispRects: arguments[ 6 ]
|
displayRects: arguments[ 6 ]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5916,7 +5921,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
height = parseInt( sizeData.Height ),
|
height = parseInt( sizeData.Height ),
|
||||||
tileSize = parseInt( imageData.TileSize ),
|
tileSize = parseInt( imageData.TileSize ),
|
||||||
tileOverlap = parseInt( imageData.Overlap ),
|
tileOverlap = parseInt( imageData.Overlap ),
|
||||||
dispRects = [],
|
displayRects = [],
|
||||||
rectData,
|
rectData,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
@ -5936,7 +5941,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
for ( i = 0; i < dispRectData.length; i++ ) {
|
for ( i = 0; i < dispRectData.length; i++ ) {
|
||||||
rectData = dispRectData[ i ].Rect;
|
rectData = dispRectData[ i ].Rect;
|
||||||
|
|
||||||
dispRects.push( new $.DisplayRect(
|
displayRects.push( new $.DisplayRect(
|
||||||
parseInt( rectData.X ),
|
parseInt( rectData.X ),
|
||||||
parseInt( rectData.Y ),
|
parseInt( rectData.Y ),
|
||||||
parseInt( rectData.Width ),
|
parseInt( rectData.Width ),
|
||||||
@ -5956,7 +5961,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
maxLevel: null, /* maxLevel */
|
maxLevel: null, /* maxLevel */
|
||||||
tilesUrl: tilesUrl, /* tilesUrl */
|
tilesUrl: tilesUrl, /* tilesUrl */
|
||||||
fileFormat: fileFormat, /* fileFormat */
|
fileFormat: fileFormat, /* fileFormat */
|
||||||
dispRects: dispRects /* dispRects */
|
displayRects: displayRects /* displayRects */
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -8204,10 +8209,10 @@ $.Drawer.prototype = {
|
|||||||
* @method
|
* @method
|
||||||
* @param {String} src - The url of the image to load.
|
* @param {String} src - The url of the image to load.
|
||||||
* @param {Function} callback - The function that will be called with the
|
* @param {Function} callback - The function that will be called with the
|
||||||
* Image object as the only parameter, whether on 'load' or on 'abort'.
|
* Image object as the only parameter if it was loaded successfully.
|
||||||
* For now this means the callback is expected to distinguish between
|
* If an error occured, or the request timed out or was aborted,
|
||||||
* error and success conditions by inspecting the Image object.
|
* the parameter is null instead.
|
||||||
* @return {Boolean} loading - Wheter the request was submitted or ignored
|
* @return {Boolean} loading - Whether the request was submitted or ignored
|
||||||
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
|
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
|
||||||
*/
|
*/
|
||||||
loadImage: function( src, callback ) {
|
loadImage: function( src, callback ) {
|
||||||
@ -8224,11 +8229,11 @@ $.Drawer.prototype = {
|
|||||||
|
|
||||||
image = new Image();
|
image = new Image();
|
||||||
|
|
||||||
complete = function( imagesrc ){
|
complete = function( imagesrc, resultingImage ){
|
||||||
_this.downloading--;
|
_this.downloading--;
|
||||||
if (typeof ( callback ) == "function") {
|
if (typeof ( callback ) == "function") {
|
||||||
try {
|
try {
|
||||||
callback( image );
|
callback( resultingImage );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
$.console.error(
|
$.console.error(
|
||||||
"%s while executing %s callback: %s",
|
"%s while executing %s callback: %s",
|
||||||
@ -8242,11 +8247,11 @@ $.Drawer.prototype = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
image.onload = function(){
|
image.onload = function(){
|
||||||
finishLoadingImage( image, complete, true );
|
finishLoadingImage( image, complete, true, jobid );
|
||||||
};
|
};
|
||||||
|
|
||||||
image.onabort = image.onerror = function(){
|
image.onabort = image.onerror = function(){
|
||||||
finishLoadingImage( image, complete, false );
|
finishLoadingImage( image, complete, false, jobid );
|
||||||
};
|
};
|
||||||
|
|
||||||
jobid = window.setTimeout( function(){
|
jobid = window.setTimeout( function(){
|
||||||
|
@ -276,10 +276,10 @@ $.Drawer.prototype = {
|
|||||||
* @method
|
* @method
|
||||||
* @param {String} src - The url of the image to load.
|
* @param {String} src - The url of the image to load.
|
||||||
* @param {Function} callback - The function that will be called with the
|
* @param {Function} callback - The function that will be called with the
|
||||||
* Image object as the only parameter, whether on 'load' or on 'abort'.
|
* Image object as the only parameter if it was loaded successfully.
|
||||||
* For now this means the callback is expected to distinguish between
|
* If an error occured, or the request timed out or was aborted,
|
||||||
* error and success conditions by inspecting the Image object.
|
* the parameter is null instead.
|
||||||
* @return {Boolean} loading - Wheter the request was submitted or ignored
|
* @return {Boolean} loading - Whether the request was submitted or ignored
|
||||||
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
|
* based on OpenSeadragon.DEFAULT_SETTINGS.imageLoaderLimit.
|
||||||
*/
|
*/
|
||||||
loadImage: function( src, callback ) {
|
loadImage: function( src, callback ) {
|
||||||
@ -296,11 +296,11 @@ $.Drawer.prototype = {
|
|||||||
|
|
||||||
image = new Image();
|
image = new Image();
|
||||||
|
|
||||||
complete = function( imagesrc ){
|
complete = function( imagesrc, resultingImage ){
|
||||||
_this.downloading--;
|
_this.downloading--;
|
||||||
if (typeof ( callback ) == "function") {
|
if (typeof ( callback ) == "function") {
|
||||||
try {
|
try {
|
||||||
callback( image );
|
callback( resultingImage );
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
$.console.error(
|
$.console.error(
|
||||||
"%s while executing %s callback: %s",
|
"%s while executing %s callback: %s",
|
||||||
@ -314,11 +314,11 @@ $.Drawer.prototype = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
image.onload = function(){
|
image.onload = function(){
|
||||||
finishLoadingImage( image, complete, true );
|
finishLoadingImage( image, complete, true, jobid );
|
||||||
};
|
};
|
||||||
|
|
||||||
image.onabort = image.onerror = function(){
|
image.onabort = image.onerror = function(){
|
||||||
finishLoadingImage( image, complete, false );
|
finishLoadingImage( image, complete, false, jobid );
|
||||||
};
|
};
|
||||||
|
|
||||||
jobid = window.setTimeout( function(){
|
jobid = window.setTimeout( function(){
|
||||||
|
@ -32,7 +32,7 @@ $.DziTileSource = function( width, height, tileSize, tileOverlap, tilesUrl, file
|
|||||||
tileOverlap: arguments[ 3 ],
|
tileOverlap: arguments[ 3 ],
|
||||||
tilesUrl: arguments[ 4 ],
|
tilesUrl: arguments[ 4 ],
|
||||||
fileFormat: arguments[ 5 ],
|
fileFormat: arguments[ 5 ],
|
||||||
dispRects: arguments[ 6 ]
|
displayRects: arguments[ 6 ]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
height = parseInt( sizeData.Height ),
|
height = parseInt( sizeData.Height ),
|
||||||
tileSize = parseInt( imageData.TileSize ),
|
tileSize = parseInt( imageData.TileSize ),
|
||||||
tileOverlap = parseInt( imageData.Overlap ),
|
tileOverlap = parseInt( imageData.Overlap ),
|
||||||
dispRects = [],
|
displayRects = [],
|
||||||
rectData,
|
rectData,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
for ( i = 0; i < dispRectData.length; i++ ) {
|
for ( i = 0; i < dispRectData.length; i++ ) {
|
||||||
rectData = dispRectData[ i ].Rect;
|
rectData = dispRectData[ i ].Rect;
|
||||||
|
|
||||||
dispRects.push( new $.DisplayRect(
|
displayRects.push( new $.DisplayRect(
|
||||||
parseInt( rectData.X ),
|
parseInt( rectData.X ),
|
||||||
parseInt( rectData.Y ),
|
parseInt( rectData.Y ),
|
||||||
parseInt( rectData.Width ),
|
parseInt( rectData.Width ),
|
||||||
@ -323,7 +323,7 @@ function configureFromObject( tileSource, configuration ){
|
|||||||
maxLevel: null, /* maxLevel */
|
maxLevel: null, /* maxLevel */
|
||||||
tilesUrl: tilesUrl, /* tilesUrl */
|
tilesUrl: tilesUrl, /* tilesUrl */
|
||||||
fileFormat: fileFormat, /* fileFormat */
|
fileFormat: fileFormat, /* fileFormat */
|
||||||
dispRects: dispRects /* dispRects */
|
displayRects: displayRects /* displayRects */
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -209,8 +209,12 @@ $.extend( $.Navigator.prototype, $.EventHandler.prototype, $.Viewer.prototype, {
|
|||||||
|
|
||||||
style.top = topleft.y + 'px';
|
style.top = topleft.y + 'px';
|
||||||
style.left = topleft.x + 'px';
|
style.left = topleft.x + 'px';
|
||||||
style.width = ( Math.abs( topleft.x - bottomright.x ) - 3 ) + 'px';
|
|
||||||
style.height = ( Math.abs( topleft.y - bottomright.y ) - 3 ) + 'px';
|
var width = Math.abs( topleft.x - bottomright.x ) - 3; // TODO: What's this magic number mean?
|
||||||
|
var height = Math.abs( topleft.y - bottomright.y ) - 3;
|
||||||
|
// make sure width and height are non-negative so IE doesn't throw
|
||||||
|
style.width = Math.max( width, 0 ) + 'px';
|
||||||
|
style.height = Math.max( height, 0 ) + 'px';
|
||||||
|
|
||||||
}( this.displayRegion.style ));
|
}( this.displayRegion.style ));
|
||||||
}
|
}
|
||||||
|
@ -222,8 +222,8 @@
|
|||||||
* position. If preserveViewport is set to true, then the viewport position
|
* position. If preserveViewport is set to true, then the viewport position
|
||||||
* is preserved when navigating between images in the sequence.
|
* is preserved when navigating between images in the sequence.
|
||||||
*
|
*
|
||||||
* @param {String} [options.prefixUrl='']
|
* @param {String} [options.prefixUrl='/images/']
|
||||||
* Appends the prefixUrl to navImages paths, which is very useful
|
* Prepends the prefixUrl to navImages paths, which is very useful
|
||||||
* since the default paths are rarely useful for production
|
* since the default paths are rarely useful for production
|
||||||
* environments.
|
* environments.
|
||||||
*
|
*
|
||||||
@ -527,43 +527,43 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
|
||||||
//INTERFACE RESOURCE SETTINGS
|
//INTERFACE RESOURCE SETTINGS
|
||||||
prefixUrl: null,
|
prefixUrl: "/images/",
|
||||||
navImages: {
|
navImages: {
|
||||||
zoomIn: {
|
zoomIn: {
|
||||||
REST: '/images/zoomin_rest.png',
|
REST: 'zoomin_rest.png',
|
||||||
GROUP: '/images/zoomin_grouphover.png',
|
GROUP: 'zoomin_grouphover.png',
|
||||||
HOVER: '/images/zoomin_hover.png',
|
HOVER: 'zoomin_hover.png',
|
||||||
DOWN: '/images/zoomin_pressed.png'
|
DOWN: 'zoomin_pressed.png'
|
||||||
},
|
},
|
||||||
zoomOut: {
|
zoomOut: {
|
||||||
REST: '/images/zoomout_rest.png',
|
REST: 'zoomout_rest.png',
|
||||||
GROUP: '/images/zoomout_grouphover.png',
|
GROUP: 'zoomout_grouphover.png',
|
||||||
HOVER: '/images/zoomout_hover.png',
|
HOVER: 'zoomout_hover.png',
|
||||||
DOWN: '/images/zoomout_pressed.png'
|
DOWN: 'zoomout_pressed.png'
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
REST: '/images/home_rest.png',
|
REST: 'home_rest.png',
|
||||||
GROUP: '/images/home_grouphover.png',
|
GROUP: 'home_grouphover.png',
|
||||||
HOVER: '/images/home_hover.png',
|
HOVER: 'home_hover.png',
|
||||||
DOWN: '/images/home_pressed.png'
|
DOWN: 'home_pressed.png'
|
||||||
},
|
},
|
||||||
fullpage: {
|
fullpage: {
|
||||||
REST: '/images/fullpage_rest.png',
|
REST: 'fullpage_rest.png',
|
||||||
GROUP: '/images/fullpage_grouphover.png',
|
GROUP: 'fullpage_grouphover.png',
|
||||||
HOVER: '/images/fullpage_hover.png',
|
HOVER: 'fullpage_hover.png',
|
||||||
DOWN: '/images/fullpage_pressed.png'
|
DOWN: 'fullpage_pressed.png'
|
||||||
},
|
},
|
||||||
previous: {
|
previous: {
|
||||||
REST: '/images/previous_rest.png',
|
REST: 'previous_rest.png',
|
||||||
GROUP: '/images/previous_grouphover.png',
|
GROUP: 'previous_grouphover.png',
|
||||||
HOVER: '/images/previous_hover.png',
|
HOVER: 'previous_hover.png',
|
||||||
DOWN: '/images/previous_pressed.png'
|
DOWN: 'previous_pressed.png'
|
||||||
},
|
},
|
||||||
next: {
|
next: {
|
||||||
REST: '/images/next_rest.png',
|
REST: 'next_rest.png',
|
||||||
GROUP: '/images/next_grouphover.png',
|
GROUP: 'next_grouphover.png',
|
||||||
HOVER: '/images/next_hover.png',
|
HOVER: 'next_hover.png',
|
||||||
DOWN: '/images/next_pressed.png'
|
DOWN: 'next_pressed.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user