mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-03-03 14:13:14 +03:00
small cleanup
This commit is contained in:
parent
757bf8690e
commit
256514bca6
@ -709,8 +709,6 @@ $.Viewport.prototype = {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
var referencePoint;
|
|
||||||
|
|
||||||
if(constraints){
|
if(constraints){
|
||||||
this.panTo(center, false);
|
this.panTo(center, false);
|
||||||
this.zoomTo(newZoom, null, false);
|
this.zoomTo(newZoom, null, false);
|
||||||
@ -725,7 +723,7 @@ $.Viewport.prototype = {
|
|||||||
// this.zoomTo(newZoom, referencePoint, immediately);
|
// this.zoomTo(newZoom, referencePoint, immediately);
|
||||||
} else {
|
} else {
|
||||||
var rotatedNewBounds = newBounds.rotate(-this.getRotation());
|
var rotatedNewBounds = newBounds.rotate(-this.getRotation());
|
||||||
referencePoint = rotatedNewBounds.getTopLeft().times(newZoom)
|
var referencePoint = rotatedNewBounds.getTopLeft().times(newZoom)
|
||||||
.minus(oldBounds.getTopLeft().times(oldZoom))
|
.minus(oldBounds.getTopLeft().times(oldZoom))
|
||||||
.divide(newZoom - oldZoom);
|
.divide(newZoom - oldZoom);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user