mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
fix for #1210 (Dinamically show ReferenceStrip) additional changes
This commit is contained in:
parent
a783edc76f
commit
ec7e5e5419
@ -504,10 +504,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
}
|
||||
|
||||
if (this.sequenceMode && $.isArray(tileSources)) {
|
||||
if (this.referenceStrip) {
|
||||
this.referenceStrip.destroy();
|
||||
this.referenceStrip = null;
|
||||
}
|
||||
this.removeReferenceStrip();
|
||||
|
||||
if (typeof initialPage != 'undefined' && !isNaN(initialPage)) {
|
||||
this.initialPage = initialPage;
|
||||
@ -519,19 +516,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
this.open(this.tileSources[this._sequenceIndex]);
|
||||
|
||||
if ( this.showReferenceStrip ){
|
||||
this.referenceStrip = new $.ReferenceStrip({
|
||||
id: this.referenceStripElement,
|
||||
position: this.referenceStripPosition,
|
||||
sizeRatio: this.referenceStripSizeRatio,
|
||||
scroll: this.referenceStripScroll,
|
||||
height: this.referenceStripHeight,
|
||||
width: this.referenceStripWidth,
|
||||
tileSources: this.tileSources,
|
||||
prefixUrl: this.prefixUrl,
|
||||
viewer: this
|
||||
});
|
||||
|
||||
this.referenceStrip.setFocus( this._sequenceIndex );
|
||||
this.addReferenceStrip();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2136,20 +2121,18 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
|
||||
/**
|
||||
* Remove the reference strip.
|
||||
* @param {Boolean} hide - Disables automatic showing of the reference strip in the future until manually re-enabled.
|
||||
* @function
|
||||
* @return {OpenSeadragon.Viewer} Chainable.
|
||||
*/
|
||||
removeReferenceStrip: function() {
|
||||
this.showReferenceStrip = false;
|
||||
|
||||
if (this.sequenceMode) {
|
||||
if (this.referenceStrip) {
|
||||
this.referenceStrip.destroy();
|
||||
this.referenceStrip = null;
|
||||
}
|
||||
removeReferenceStrip: function(hide) {
|
||||
if (hide) {
|
||||
this.showReferenceStrip = false;
|
||||
}
|
||||
|
||||
return this;
|
||||
if (this.referenceStrip) {
|
||||
this.referenceStrip.destroy();
|
||||
this.referenceStrip = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -2162,8 +2145,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
|
||||
if (this.sequenceMode) {
|
||||
if (this.referenceStrip) {
|
||||
this.referenceStrip.destroy();
|
||||
this.referenceStrip = null;
|
||||
return this;
|
||||
}
|
||||
|
||||
if (this.tileSources.length && this.tileSources.length > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user