These are chat archives for openseadragon/openseadragon
setBounds? I think that should do it...you just need to keep in mind that the aspect ratio is probably changing, and that fitBounds will center the bounds you give it inside the given aspect ratio if you don't provide an exact match.
immediatelyflag, otherwise it'll bounce around
var imageRect = viewer.viewport.viewportToImageRectangle(viewer.viewport.getHomeBounds()); var deltaX = containerSize.x - prevContainerSize.x; var deltaY = containerSize.y - prevContainerSize.y; imageRect.width += deltaX; imageRect.height += deltaY; var newViewRect = viewer.viewport.imageToViewportRectangle(imageRect); viewer.viewport.fitBounds(newViewRect, true);
autoResize=false, you might also need to call