mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +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) {
|
||||
var orthBounds = viewportBounds.rotate(90);
|
||||
var halfWidth = orthBounds.width / 2;
|
||||
var halfHeight = orthBounds.height / 2;
|
||||
viewportBounds.x -= halfWidth / 2;
|
||||
viewportBounds.y -= halfHeight / 2;
|
||||
viewportBounds.width += halfWidth;
|
||||
viewportBounds.height += halfHeight;
|
||||
viewportBounds.x -= orthBounds.width / 2;
|
||||
viewportBounds.y -= orthBounds.height / 2;
|
||||
viewportBounds.width += orthBounds.width;
|
||||
viewportBounds.height += orthBounds.height;
|
||||
viewportTL = viewportBounds.getTopLeft();
|
||||
viewportBR = viewportBounds.getBottomRight();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user