mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-27 23:56:09 +03:00
Compare commits
7 Commits
c5639e32b5
...
11f70d54e8
Author | SHA1 | Date | |
---|---|---|---|
|
11f70d54e8 | ||
|
b8cc7e171e | ||
|
554149cf4f | ||
|
968cb96bc4 | ||
|
6fa8e6695d | ||
|
27399beffe | ||
|
29384cd5ff |
@ -11,6 +11,7 @@ OPENSEADRAGON CHANGELOG
|
||||
* You can now provide an element for the navigator (as an alternative to an ID) (#1303 @cameronbaney, #2166 #2175 @joedf)
|
||||
* Now supporting IIIF "id" and "identifier" in addition to "@id" (#2173 @ahankinson)
|
||||
* We now delegate tile fetching and caching to the TileSource, to allow for custom tile formats (#2148 @Aiosa)
|
||||
* The viewer now emits before-destroy and destroy events (#2239 @pearcetm)
|
||||
* Improved documentation (#2211 @shyamkumaryadav)
|
||||
* Fixed: Cropping tiled images with polygons was broken (#2183 @altert)
|
||||
* Fixed: Disabling buttons only changed their appearance, but they were still clickable (#2187 @pearcetm)
|
||||
|
@ -756,6 +756,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
* viewer = null; //important
|
||||
*
|
||||
* @function
|
||||
* @fires OpenSeadragon.Viewer.event:before-destroy
|
||||
* @fires OpenSeadragon.Viewer.event:destroy
|
||||
*/
|
||||
destroy: function( ) {
|
||||
if ( !THIS[ this.hash ] ) {
|
||||
@ -763,6 +765,17 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raised when the viewer is about to be destroyed (see {@link OpenSeadragon.Viewer#before-destroy}).
|
||||
*
|
||||
* @event before-destroy
|
||||
* @memberof OpenSeadragon.Viewer
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.raiseEvent( 'before-destroy' );
|
||||
|
||||
this._removeUpdatePixelDensityRatioEvent();
|
||||
|
||||
this.close();
|
||||
@ -795,7 +808,6 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
this.navigator = null;
|
||||
}
|
||||
|
||||
this.removeAllHandlers();
|
||||
|
||||
if (this.buttonGroup) {
|
||||
this.buttonGroup.destroy();
|
||||
@ -841,6 +853,19 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
|
||||
// clear our reference to the main element - they will need to pass it in again, creating a new viewer
|
||||
this.element = null;
|
||||
|
||||
/**
|
||||
* Raised when the viewer is destroyed (see {@link OpenSeadragon.Viewer#destroy}).
|
||||
*
|
||||
* @event destroy
|
||||
* @memberof OpenSeadragon.Viewer
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.raiseEvent( 'destroy' );
|
||||
|
||||
this.removeAllHandlers();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -514,7 +514,7 @@ $.Viewport.prototype = {
|
||||
* @param {OpenSeadragon.Rect} bounds
|
||||
* @returns {OpenSeadragon.Rect} constrained bounds.
|
||||
*/
|
||||
_applyBoundaryConstraints: function(bounds) {
|
||||
_applyBoundaryConstraints: function(bounds) {
|
||||
var newBounds = new $.Rect(
|
||||
bounds.x,
|
||||
bounds.y,
|
||||
|
Loading…
Reference in New Issue
Block a user