From 6b90687ab46ab0de94317edea94cb8b0987b96c0 Mon Sep 17 00:00:00 2001 From: Sharpbarb Date: Thu, 10 Oct 2013 12:27:49 -0700 Subject: [PATCH] Update viewer.js description; Move _updateSequenceButtons behind goToPage() --- src/viewer.js | 61 ++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 6ac66609..cfb6d02a 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1083,6 +1083,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, }, /** + * Gets the active page of a sequence * @function * @name OpenSeadragon.Viewer.prototype.currentPage * @return {Number} @@ -1090,36 +1091,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, currentPage: function () { 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 @@ -1152,6 +1123,36 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, 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 * @function