From a7cc7bbfba250a2fdce17c7838a53e441071319b Mon Sep 17 00:00:00 2001 From: Nikolaj Mikkelsen Date: Thu, 26 Oct 2017 22:36:19 +0200 Subject: [PATCH] Refactor: move the documentation comment down with the event --- src/viewer.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index c7a2e7fd..88912fb5 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1832,16 +1832,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, */ goToPage: function( page ){ if( this.tileSources && page >= 0 && page < this.tileSources.length ){ - /** - * Raised when the page is changed on a viewer configured with multiple image sources (see {@link OpenSeadragon.Viewer#goToPage}). - * - * @event page - * @memberof OpenSeadragon.Viewer - * @type {Object} - * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event. - * @property {Number} page - The page index. - * @property {?Object} userData - Arbitrary subscriber-defined object. - */ this._sequenceIndex = page; this._updateSequenceButtons( page ); @@ -1852,6 +1842,16 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, this.referenceStrip.setFocus( page ); } + /** + * Raised when the page is changed on a viewer configured with multiple image sources (see {@link OpenSeadragon.Viewer#goToPage}). + * + * @event page + * @memberof OpenSeadragon.Viewer + * @type {Object} + * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event. + * @property {Number} page - The page index. + * @property {?Object} userData - Arbitrary subscriber-defined object. + */ this.raiseEvent( 'page', { page: page } ); }