Fix for #1085 - goToPage : event sent before updating the index

This commit is contained in:
Nikolaj Mikkelsen 2017-10-24 15:18:57 +02:00
parent 557ff005a2
commit 1a6aac578b

View File

@ -1842,8 +1842,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @property {Number} page - The page index. * @property {Number} page - The page index.
* @property {?Object} userData - Arbitrary subscriber-defined object. * @property {?Object} userData - Arbitrary subscriber-defined object.
*/ */
this.raiseEvent( 'page', { page: page } );
this._sequenceIndex = page; this._sequenceIndex = page;
this._updateSequenceButtons( page ); this._updateSequenceButtons( page );
@ -1853,6 +1851,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
if( this.referenceStrip ){ if( this.referenceStrip ){
this.referenceStrip.setFocus( page ); this.referenceStrip.setFocus( page );
} }
this.raiseEvent( 'page', { page: page } );
} }
return this; return this;