mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
For multi-image open, drawing isn't started until all tileSources have been opened
This commit is contained in:
parent
9c2dda6991
commit
88c488d706
@ -35,6 +35,7 @@ OPENSEADRAGON CHANGELOG
|
||||
* Rect and Point now have clone functions
|
||||
* New Viewport method for managing homeBounds as well as constraints: setHomeBounds
|
||||
* Viewport.open supports positioning config properties
|
||||
* For multi-image open, drawing isn't started until all tileSources have been opened
|
||||
* Margins option to push the home region in from the edges of the Viewer (#505)
|
||||
* Rect and Point toString() functions are now consistent: rounding values to nearest hundredth
|
||||
* Overlays appear in the DOM immediately on open or addOverlay (#507)
|
||||
|
@ -524,6 +524,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
return;
|
||||
}
|
||||
|
||||
this._opening = true;
|
||||
|
||||
var expected = tileSources.length;
|
||||
var successes = 0;
|
||||
var failures = 0;
|
||||
@ -552,6 +554,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
}
|
||||
|
||||
_this._drawOverlays();
|
||||
_this._opening = false;
|
||||
|
||||
/**
|
||||
* Raised when the viewer has opened and loaded one or more TileSources.
|
||||
@ -566,6 +569,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
// TODO: what if there are multiple sources?
|
||||
_this.raiseEvent( 'open', { source: source } );
|
||||
} else {
|
||||
_this._opening = false;
|
||||
|
||||
/**
|
||||
* Raised when an error occurs loading a TileSource.
|
||||
*
|
||||
@ -655,6 +660,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
||||
return this;
|
||||
}
|
||||
|
||||
this._opening = false;
|
||||
|
||||
if ( this.navigator ) {
|
||||
this.navigator.close();
|
||||
}
|
||||
@ -2794,6 +2801,10 @@ function updateOnce( viewer ) {
|
||||
|
||||
//viewer.profiler.beginUpdate();
|
||||
|
||||
if (viewer._opening) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( viewer.autoResize ) {
|
||||
var containerSize = _getSafeElemSize( viewer.container );
|
||||
if ( !containerSize.equals( THIS[ viewer.hash ].prevContainerSize ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user