mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
fix for #1209 (Reference strip using "thumbs")
This commit is contained in:
parent
51cf6201cf
commit
413e40a64c
@ -50,6 +50,7 @@
|
|||||||
* @extends OpenSeadragon.TileSource
|
* @extends OpenSeadragon.TileSource
|
||||||
* @param {Object} options Options object.
|
* @param {Object} options Options object.
|
||||||
* @param {String} options.url URL of the image
|
* @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
|
* @param {Boolean} [options.buildPyramid=true] If set to true (default), a
|
||||||
* pyramid will be built internally to provide a better downsampling.
|
* pyramid will be built internally to provide a better downsampling.
|
||||||
* @param {String|Boolean} [options.crossOriginPolicy=false] Valid values are
|
* @param {String|Boolean} [options.crossOriginPolicy=false] Valid values are
|
||||||
|
@ -428,9 +428,19 @@ function loadPanels( strip, viewerSize, scroll ) {
|
|||||||
for ( i = activePanelsStart; i < activePanelsEnd && i < strip.panels.length; i++ ) {
|
for ( i = activePanelsStart; i < activePanelsEnd && i < strip.panels.length; i++ ) {
|
||||||
element = strip.panels[i];
|
element = strip.panels[i];
|
||||||
if ( !element.activePanel ) {
|
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( {
|
miniViewer = new $.Viewer( {
|
||||||
id: element.id,
|
id: element.id,
|
||||||
tileSources: [strip.viewer.tileSources[i]],
|
tileSources: [miniTileSource],
|
||||||
element: element,
|
element: element,
|
||||||
navigatorSizeRatio: strip.sizeRatio,
|
navigatorSizeRatio: strip.sizeRatio,
|
||||||
showNavigator: false,
|
showNavigator: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user