mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-16 23:03:13 +03:00
Increase viewport bounds slightly for rotation.
This commit is contained in:
parent
a8b6c8d0e1
commit
1c63c96f04
@ -405,12 +405,10 @@ function updateViewport( drawer ) {
|
|||||||
}
|
}
|
||||||
else if (degrees !== 0) {
|
else if (degrees !== 0) {
|
||||||
var orthBounds = viewportBounds.rotate(90);
|
var orthBounds = viewportBounds.rotate(90);
|
||||||
var halfWidth = orthBounds.width / 2;
|
viewportBounds.x -= orthBounds.width / 2;
|
||||||
var halfHeight = orthBounds.height / 2;
|
viewportBounds.y -= orthBounds.height / 2;
|
||||||
viewportBounds.x -= halfWidth / 2;
|
viewportBounds.width += orthBounds.width;
|
||||||
viewportBounds.y -= halfHeight / 2;
|
viewportBounds.height += orthBounds.height;
|
||||||
viewportBounds.width += halfWidth;
|
|
||||||
viewportBounds.height += halfHeight;
|
|
||||||
viewportTL = viewportBounds.getTopLeft();
|
viewportTL = viewportBounds.getTopLeft();
|
||||||
viewportBR = viewportBounds.getBottomRight();
|
viewportBR = viewportBounds.getBottomRight();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user