diff --git a/snap-ui/src/main/java/org/esa/snap/ui/product/ProductSceneView.java b/snap-ui/src/main/java/org/esa/snap/ui/product/ProductSceneView.java index 1cd3b55d72..7c6ba5cd66 100644 --- a/snap-ui/src/main/java/org/esa/snap/ui/product/ProductSceneView.java +++ b/snap-ui/src/main/java/org/esa/snap/ui/product/ProductSceneView.java @@ -1074,7 +1074,10 @@ public boolean synchronizeViewportIfPossible(ProductSceneView thatView) { thatGeoCoding.getPixelPos(geoCenter, imageCenter); if (imageCenter.isValid()) { thatView.getBaseImageLayer().getImageToModelTransform().transform(imageCenter, modelCenter); - thatViewport.setZoomFactor(thisViewport.getZoomFactor(), modelCenter.getX(), modelCenter.getY()); + double heightCoef = this.getModelBounds().getHeight() / thatView.getModelBounds().getHeight(); + double widthCoef = this.getModelBounds().getWidth() / thatView.getModelBounds().getWidth(); + double coef = Math.sqrt(heightCoef*widthCoef); + thatViewport.setZoomFactor(thisViewport.getZoomFactor()*coef, modelCenter.getX(), modelCenter.getY()); return true; } }