mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Update the source when the base layer change.
This commit is contained in:
parent
d43b6d86b5
commit
695df873ca
@ -1155,8 +1155,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
if ( THIS[ this.hash ].sequenced ) {
|
if ( THIS[ this.hash ].sequenced ) {
|
||||||
throw new Error( "Cannot reassign base level when in sequence mode." );
|
throw new Error( "Cannot reassign base level when in sequence mode." );
|
||||||
}
|
}
|
||||||
// We need to re-assign the base drawer
|
// We need to re-assign the base drawer and the source
|
||||||
this.drawer = level === 0 ? drawer : this.getLayerAtLevel( level );
|
this.drawer = level === 0 ? drawer : this.getLayerAtLevel( level );
|
||||||
|
this.source = this.drawer.source;
|
||||||
}
|
}
|
||||||
this.drawers.splice( oldLevel, 1 );
|
this.drawers.splice( oldLevel, 1 );
|
||||||
this.drawers.splice( level, 0, drawer );
|
this.drawers.splice( level, 0, drawer );
|
||||||
|
@ -146,13 +146,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateOrder() {
|
function updateOrder() {
|
||||||
var nbLayers = viewer.getNumberOfLayers();
|
var nbLayers = viewer.getLayersCount();
|
||||||
if ( nbLayers < 2 ) {
|
if ( nbLayers < 2 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.each( $( "#used select option" ), function( index, value ) {
|
$.each( $( "#used select option" ), function( index, value ) {
|
||||||
var layer = value.innerHTML;
|
var layer = value.innerHTML;
|
||||||
viewer.setLayerLevel( layers[layer], nbLayers - index );
|
viewer.setLayerLevel( layers[layer], nbLayers -1 - index );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user