mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
* Fixed an error in fitBounds that occurred sometimes with immediately = true
This commit is contained in:
parent
ec2e4a4e8f
commit
2172da6aaa
@ -46,6 +46,7 @@ OPENSEADRAGON CHANGELOG
|
||||
* Added ajaxWithCredentials option (#543)
|
||||
* Added viewport-change event for after the viewport changes but before it's drawn
|
||||
* A spring's current value is now updated immediately on reset (#524)
|
||||
* Fixed an error in fitBounds that occurred sometimes with immediately = true
|
||||
|
||||
1.2.1: (in progress)
|
||||
|
||||
|
@ -588,11 +588,17 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
||||
}
|
||||
|
||||
newBounds = this._applyBoundaryConstraints( newBounds, immediately );
|
||||
center = newBounds.getCenter();
|
||||
}
|
||||
|
||||
if (immediately) {
|
||||
this.panTo( center, true );
|
||||
return this.zoomTo(newZoom, null, true);
|
||||
}
|
||||
|
||||
if (Math.abs(newZoom - oldZoom) < 0.00000000001 ||
|
||||
Math.abs(newBounds.width - oldBounds.width) < 0.00000000001) {
|
||||
return this.panTo( constraints ? newBounds.getCenter() : center, immediately );
|
||||
return this.panTo( center, immediately );
|
||||
}
|
||||
|
||||
referencePoint = oldBounds.getTopLeft().times(
|
||||
|
Loading…
Reference in New Issue
Block a user