fix for #1209 (Reference strip using "thumbs")

This commit is contained in:
Robert Saric 2017-07-06 21:59:26 +02:00
parent 51cf6201cf
commit 413e40a64c
2 changed files with 12 additions and 1 deletions

View File

@ -50,6 +50,7 @@
* @extends OpenSeadragon.TileSource
* @param {Object} options Options object.
* @param {String} options.url URL of the image
* @param {String} options.referenceStripThumbnailUrl URL of the dedicated thumbnail image
* @param {Boolean} [options.buildPyramid=true] If set to true (default), a
* pyramid will be built internally to provide a better downsampling.
* @param {String|Boolean} [options.crossOriginPolicy=false] Valid values are

View File

@ -428,9 +428,19 @@ function loadPanels( strip, viewerSize, scroll ) {
for ( i = activePanelsStart; i < activePanelsEnd && i < strip.panels.length; i++ ) {
element = strip.panels[i];
if ( !element.activePanel ) {
var miniTileSource;
var originalTileSource = strip.viewer.tileSources[i];
if (originalTileSource.referenceStripThumbnailUrl) {
miniTileSource = {
type: 'image',
url: originalTileSource.referenceStripThumbnailUrl
};
} else {
miniTileSource = originalTileSource;
}
miniViewer = new $.Viewer( {
id: element.id,
tileSources: [strip.viewer.tileSources[i]],
tileSources: [miniTileSource],
element: element,
navigatorSizeRatio: strip.sizeRatio,
showNavigator: false,