Merged upstream changes

This commit is contained in:
Mark Salsbery 2013-11-20 20:39:06 -08:00
commit b38823e390
3 changed files with 17 additions and 23 deletions

View File

@ -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)

View File

@ -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,

View File

@ -1223,34 +1223,30 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* @return {OpenSeadragon.Viewer} Chainable.
*/
goToPage: function( 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}
* @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 {Number} page - The page index.
* @property {?Object} userData - Arbitrary subscriber-defined object.
*/
this.raiseEvent( 'page', { page: page } );
if( this.tileSources.length > page ){
THIS[ this.hash ].sequence = page;
this._updateSequenceButtons( page );
this.open( this.tileSources[ page ] );
}
if( $.isFunction( this.onPageChange ) ){
this.onPageChange({
page: page,
viewer: this
});
}
if( this.referenceStrip ){
this.referenceStrip.setFocus( page );
}
}
return this;
},