mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
commit
ef8bd1a198
@ -711,6 +711,7 @@ function loadTile( drawer, tile, time ) {
|
|||||||
tile.loading = true;
|
tile.loading = true;
|
||||||
drawer.imageLoader.addJob({
|
drawer.imageLoader.addJob({
|
||||||
src: tile.url,
|
src: tile.url,
|
||||||
|
crossOriginPolicy: drawer.crossOriginPolicy,
|
||||||
callback: function( image ){
|
callback: function( image ){
|
||||||
onTileLoad( drawer, tile, time, image );
|
onTileLoad( drawer, tile, time, image );
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
*
|
*
|
||||||
* @memberof OpenSeadragon
|
* @memberof OpenSeadragon
|
||||||
* @param {String} source - URL of image to download.
|
* @param {String} source - URL of image to download.
|
||||||
|
* @param {String} crossOriginPolicy - CORS policy to use for downloads
|
||||||
* @param {Function} callback - Called once image has finished downloading.
|
* @param {Function} callback - Called once image has finished downloading.
|
||||||
*/
|
*/
|
||||||
function ImageJob ( options ) {
|
function ImageJob ( options ) {
|
||||||
@ -69,7 +70,7 @@ ImageJob.prototype = {
|
|||||||
|
|
||||||
this.image = new Image();
|
this.image = new Image();
|
||||||
|
|
||||||
if ( _this.crossOriginPolicy !== false ) {
|
if ( this.crossOriginPolicy !== false ) {
|
||||||
this.image.crossOrigin = this.crossOriginPolicy;
|
this.image.crossOrigin = this.crossOriginPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,6 +123,7 @@ $.ImageLoader.prototype = {
|
|||||||
* Add an unloaded image to the loader queue.
|
* Add an unloaded image to the loader queue.
|
||||||
* @method
|
* @method
|
||||||
* @param {String} src - URL of image to download.
|
* @param {String} src - URL of image to download.
|
||||||
|
* @param {String} crossOriginPolicy - CORS policy to use for downloads
|
||||||
* @param {Function} callback - Called once image has been downloaded.
|
* @param {Function} callback - Called once image has been downloaded.
|
||||||
*/
|
*/
|
||||||
addJob: function( options ) {
|
addJob: function( options ) {
|
||||||
@ -131,6 +133,7 @@ $.ImageLoader.prototype = {
|
|||||||
},
|
},
|
||||||
jobOptions = {
|
jobOptions = {
|
||||||
src: options.src,
|
src: options.src,
|
||||||
|
crossOriginPolicy: options.crossOriginPolicy,
|
||||||
callback: complete
|
callback: complete
|
||||||
},
|
},
|
||||||
newJob = new ImageJob( jobOptions );
|
newJob = new ImageJob( jobOptions );
|
||||||
|
Loading…
Reference in New Issue
Block a user