mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Merged upstream changes
This commit is contained in:
commit
b38823e390
@ -28,6 +28,7 @@ OPENSEADRAGON CHANGELOG
|
||||
* The `fullpage` property of the 'full-page' event is now `fullPage`.
|
||||
* There is now a 'full-screen' event with a `fullScreen` property (true if it has gone to full screen).
|
||||
* There are now 'pre-full-page' and 'pre-full-screen' events that include a `preventDefaultAction` property you can set in your handler to cancel. They also have `fullPage` and `fullScreen` properties respectively, to indicate if they are going into or out of the mode.
|
||||
* BREAKING CHANGE: Removed the 'onPageChange' callback from the viewer options. Viewer.goToPage() now raises the 'page' event only (#285)
|
||||
* MouseTracker now passes the original event objects to its handler methods (#23)
|
||||
* MouseTracker now supports an optional 'moveHandler' method for tracking mousemove events (#215)
|
||||
* Added stopHandler to MouseTracker. (#262)
|
||||
|
@ -699,9 +699,6 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
||||
collectionMode: false,
|
||||
collectionTileSize: 800,
|
||||
|
||||
//EVENT RELATED CALLBACKS
|
||||
onPageChange: null,
|
||||
|
||||
//PERFORMANCE SETTINGS
|
||||
imageLoaderLimit: 0,
|
||||
maxImageCacheCount: 200,
|
||||
|
@ -1223,34 +1223,30 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
* @return {OpenSeadragon.Viewer} Chainable.
|
||||
*/
|
||||
goToPage: function( page ){
|
||||
/**
|
||||
* @event page
|
||||
* @memberof OpenSeadragon.Viewer
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {Object} page - The page index to change to.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.raiseEvent( 'page', { page: page } );
|
||||
|
||||
if( this.tileSources.length > page ){
|
||||
if( page >= 0 && page < this.tileSources.length ){
|
||||
/**
|
||||
* Raised when the page is changed on a viewer configured with multiple image sources.
|
||||
*
|
||||
* @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 } );
|
||||
|
||||
THIS[ this.hash ].sequence = page;
|
||||
|
||||
this._updateSequenceButtons( page );
|
||||
|
||||
this.open( this.tileSources[ page ] );
|
||||
|
||||
if( this.referenceStrip ){
|
||||
this.referenceStrip.setFocus( page );
|
||||
}
|
||||
}
|
||||
|
||||
if( $.isFunction( this.onPageChange ) ){
|
||||
this.onPageChange({
|
||||
page: page,
|
||||
viewer: this
|
||||
});
|
||||
}
|
||||
if( this.referenceStrip ){
|
||||
this.referenceStrip.setFocus( page );
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user