cleaning up changes

This commit is contained in:
Tom 2022-12-14 09:25:23 -05:00
parent 9daa8feec1
commit 9ccf93d767

View File

@ -3581,13 +3581,11 @@ function doViewerResize(viewer, containerSize){
var resizeRatio;
if (viewer.preserveImageSizeOnResize) {
resizeRatio = THIS[viewer.hash].prevContainerSize.x / containerSize.x;
// viewport.zoomTo(zoom * resizeRatio, null, true);
} else {
var o = new $.Point(0, 0);
var prevDiag = new $.Point(THIS[viewer.hash].prevContainerSize.x, THIS[viewer.hash].prevContainerSize.y).distanceTo(o);
var newDiag = new $.Point(containerSize.x, containerSize.y).distanceTo(o);
var origin = new $.Point(0, 0);
var prevDiag = new $.Point(THIS[viewer.hash].prevContainerSize.x, THIS[viewer.hash].prevContainerSize.y).distanceTo(origin);
var newDiag = new $.Point(containerSize.x, containerSize.y).distanceTo(origin);
resizeRatio = newDiag / prevDiag * THIS[viewer.hash].prevContainerSize.x / containerSize.x;
// viewport.zoomTo(zoom, null, true);
}
viewport.zoomTo(zoom * resizeRatio, null, true);
THIS[viewer.hash].prevContainerSize = containerSize;