mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-08 02:49:22 +03:00
Update viewer.js
description; Move _updateSequenceButtons behind goToPage()
This commit is contained in:
parent
a862870883
commit
6b90687ab4
@ -1083,6 +1083,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the active page of a sequence
|
||||||
* @function
|
* @function
|
||||||
* @name OpenSeadragon.Viewer.prototype.currentPage
|
* @name OpenSeadragon.Viewer.prototype.currentPage
|
||||||
* @return {Number}
|
* @return {Number}
|
||||||
@ -1091,36 +1092,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
return THIS[ this.hash ].sequence;
|
return THIS[ this.hash ].sequence;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the sequence buttons.
|
|
||||||
* @function
|
|
||||||
* @private
|
|
||||||
* @param {Number} Sequence Value
|
|
||||||
*/
|
|
||||||
_updateSequenceButtons: function (page) {
|
|
||||||
|
|
||||||
if( this.nextButton ){
|
|
||||||
if( ( this.tileSources.length - 1 ) === page ){
|
|
||||||
//Disable next button
|
|
||||||
if(!this.navPrevNextWrap){
|
|
||||||
this.nextButton.disable();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.nextButton.enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( this.previousButton ){
|
|
||||||
if( page > 0 ){
|
|
||||||
//Enable previous button
|
|
||||||
this.previousButton.enable();
|
|
||||||
} else {
|
|
||||||
if(!this.navPrevNextWrap){
|
|
||||||
this.previousButton.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @function
|
* @function
|
||||||
* @name OpenSeadragon.Viewer.prototype.goToPage
|
* @name OpenSeadragon.Viewer.prototype.goToPage
|
||||||
@ -1152,6 +1123,36 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the sequence buttons.
|
||||||
|
* @function
|
||||||
|
* @private
|
||||||
|
* @param {Number} Sequence Value
|
||||||
|
*/
|
||||||
|
_updateSequenceButtons: function (page) {
|
||||||
|
|
||||||
|
if( this.nextButton ){
|
||||||
|
if( ( this.tileSources.length - 1 ) === page ){
|
||||||
|
//Disable next button
|
||||||
|
if(!this.navPrevNextWrap){
|
||||||
|
this.nextButton.disable();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.nextButton.enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( this.previousButton ){
|
||||||
|
if( page > 0 ){
|
||||||
|
//Enable previous button
|
||||||
|
this.previousButton.enable();
|
||||||
|
} else {
|
||||||
|
if(!this.navPrevNextWrap){
|
||||||
|
this.previousButton.disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a message in the viewport
|
* Display a message in the viewport
|
||||||
* @function
|
* @function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user