mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
re-enable html drawer in drawer comparison demo; deal with merge conflict resolution issues
This commit is contained in:
parent
36d8b3d9ad
commit
6b995c018b
@ -1404,7 +1404,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
this._loadTile(tile, currentTime);
|
||||
}
|
||||
}, this);
|
||||
|
||||
|
||||
this._needsDraw = true;
|
||||
return false;
|
||||
} else {
|
||||
@ -2145,6 +2145,30 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
return previousBest;
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @inner
|
||||
* Sorts tiles in an array according to distance and visibility.
|
||||
*
|
||||
* @param {OpenSeadragon.Tile[]} tiles The tiles.
|
||||
*/
|
||||
_sortTiles: function( tiles ) {
|
||||
tiles.sort(function (a, b) {
|
||||
if (a === null) {
|
||||
return 1;
|
||||
}
|
||||
if (b === null) {
|
||||
return -1;
|
||||
}
|
||||
if (a.visibility === b.visibility) {
|
||||
return (a.squaredDistance - b.squaredDistance);
|
||||
} else {
|
||||
return (a.visibility - b.visibility);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @inner
|
||||
|
@ -58,18 +58,18 @@ let viewer2 = window.viewer2 = OpenSeadragon({
|
||||
});
|
||||
|
||||
// // viewer3: html drawer, unused
|
||||
// var viewer3 = window.viewer3 = OpenSeadragon({
|
||||
// id: "htmldrawer",
|
||||
// drawer:'html',
|
||||
// blendTime:2,
|
||||
// prefixUrl: "../../build/openseadragon/images/",
|
||||
// minZoomImageRatio:0.01,
|
||||
// customDrawer: OpenSeadragon.HTMLDrawer,
|
||||
// tileSources: [sources['leaves'], sources['rainbow'], sources['duomo']],
|
||||
// sequenceMode: true,
|
||||
// crossOriginPolicy: 'Anonymous',
|
||||
// ajaxWithCredentials: false
|
||||
// });
|
||||
var viewer3 = window.viewer3 = OpenSeadragon({
|
||||
id: "htmldrawer",
|
||||
drawer:'html',
|
||||
blendTime:2,
|
||||
prefixUrl: "../../build/openseadragon/images/",
|
||||
minZoomImageRatio:0.01,
|
||||
customDrawer: OpenSeadragon.HTMLDrawer,
|
||||
tileSources: [sources['leaves'], sources['rainbow'], sources['duomo']],
|
||||
sequenceMode: true,
|
||||
crossOriginPolicy: 'Anonymous',
|
||||
ajaxWithCredentials: false
|
||||
});
|
||||
|
||||
|
||||
// Sync navigation of viewer1 and viewer 2
|
||||
|
Loading…
Reference in New Issue
Block a user