Updating openseadragon from v3.1.0 to v4.1.0 breaks the image viewport panning(Dragging)

112 Views Asked by At

I have updated the openseadragon version from v3.1.0 to v4.1.0. Suddenly the initial panning is behaving differently. I want the panning to enable only on zooming as in V3.1.0. Which was possible with setting constrainDuringPan: true, visibilityRatio: 1.0

Now the same is not working in v4.1.0.

If u try to pan the image vertically it behaves differently.

Demo is available at Stackblitz urls:

v3.1.0

v4.1.0

    <!DOCTYPE html>
        <html lang="en">
        <head>
          <!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/openseadragon/openseadragon.min.js"></script> -->
          <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/openseadragon/openseadragon.min.js"></script>
          <script type="text/javascript">
            function myFunction() {
              let duomo = {
                Image: {
                  xmlns: "http://schemas.microsoft.com/deepzoom/2008",
                  Url: "https://openseadragon.github.io/example-images/duomo/duomo_files/",
                  Format: "jpg",
                  Overlap: "2",
                  TileSize: "256",
                  Size: {
                    Width: "13920",
                    Height: "5000"
                  }
                }
              };
        
              let viewer = OpenSeadragon({
                id: "seadragon-viewer",
                prefixUrl: "https://openseadragon.github.io/openseadragon/images/",
                tileSources: duomo,
                showNavigator: false,
                constrainDuringPan: true,
                visibilityRatio: 1.0
              });
            }
          </script>
        </head>
        <body onload="myFunction()">
          <div id="seadragon-viewer" style="width:800px; height:600px"></div>
        </body>
        </html>
# 
0

There are 0 best solutions below