re-enable html drawer in drawer comparison demo; deal with merge conflict resolution issues

This commit is contained in:
Tom 2023-11-29 17:35:49 -05:00
parent 36d8b3d9ad
commit 6b995c018b
2 changed files with 37 additions and 13 deletions

View File

@ -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

View File

@ -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