mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Merge pull request #1330 from ncmikkelsen/master
Fix for #1085 - goToPage : event sent before updating the index
This commit is contained in:
commit
854086a62f
@ -1835,6 +1835,16 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
*/
|
||||
goToPage: function( page ){
|
||||
if( this.tileSources && page >= 0 && page < this.tileSources.length ){
|
||||
this._sequenceIndex = page;
|
||||
|
||||
this._updateSequenceButtons( page );
|
||||
|
||||
this.open( this.tileSources[ page ] );
|
||||
|
||||
if( this.referenceStrip ){
|
||||
this.referenceStrip.setFocus( page );
|
||||
}
|
||||
|
||||
/**
|
||||
* Raised when the page is changed on a viewer configured with multiple image sources (see {@link OpenSeadragon.Viewer#goToPage}).
|
||||
*
|
||||
@ -1846,16 +1856,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.raiseEvent( 'page', { page: page } );
|
||||
|
||||
this._sequenceIndex = page;
|
||||
|
||||
this._updateSequenceButtons( page );
|
||||
|
||||
this.open( this.tileSources[ page ] );
|
||||
|
||||
if( this.referenceStrip ){
|
||||
this.referenceStrip.setFocus( page );
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user