Default Image Size in CanvasPanel Component #230
-
We're looking at doing a drop-in replacement of a Leaflet viewer and I'm curious if there's any way to control the initial image size selected for the canvas. We're able to match the canvas size, but it looks like the initial image size that is selected is different. Based on this section in the documentation, I just want to confirm that we won't necessarily be able to exactly match the image size that is selected in our Leaflet viewer. https://iiif-canvas-panel.netlify.app/docs/examples/rendering-modes/#rendering-strategies |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Sorry, I'm having a bit of trouble understand exactly what canvas panel should display? If you're using a "static", the aspect ratio of canvas panel should match the current canvas, and a specified height or width. In the default/zoom preset it should expand to fill the available space. In terms of which URLs are requested, that's something that's a bit trickier to control (and something we want to improve). It will compile a list of all the available fixed "sizes" and also tiled image layers (scale factors) and depending on the current zoom level and DPI of the display, will use one of them as the initial image. Fixed size images are weighted slightly more, as they tend to be more performant. The viewer will also pick some smaller sizes that are loaded quickly that render behind the larger tiled image. For comparison on image loading strategies:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @stephenwf! The portion on the URL requested is what I was interested in learning a little more about. The initial image selected looks good and works with the canvas size. Since our goal is to swap out our Leaflet viewer with as few visual differences as possible, I wanted to make sure there wasn't something I was missing that we could do to exactly match the initial image size selected, |
Beta Was this translation helpful? Give feedback.
Sorry, I'm having a bit of trouble understand exactly what canvas panel should display? If you're using a "static", the aspect ratio of canvas panel should match the current canvas, and a specified height or width. In the default/zoom preset it should expand to fill the available space.
In terms of which URLs are requested, that's something that's a bit trickier to control (and something we want to improve). It will compile a list of all the available fixed "sizes" and also tiled image layers (scale factors) and depending on the current zoom level and DPI of the display, will use one of them as the initial image. Fixed size images are weighted slightly more, as they tend to be more perfor…