-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index bigger than number of layers when loading in multilayer IIIF images #2457
Comments
How are you actually loading these into the viewer once the information is available asynchronously? With |
I will have to look at Mirador viewer and get back to you. |
@pearcetm Mirador uses viewer.addTiledImage() in it's |
Here is the section: viewer.addTiledImage({
error: event => reject(event),
fitBounds: new OpenSeadragon.Rect(
...canvasWorld.contentResourceToWorldCoordinates(contentResource),
),
index: canvasWorld.layerIndexOfImageResource(contentResource),
opacity: canvasWorld.layerOpacityOfImageResource(contentResource),
success: event => resolve(event),
tileSource,
}); |
I can't tell just from the code what is going on. Is there a demo page that shows the behavior you're describing? What is the error message you're seeing? OSD can add tiled images with index undefined, and doesn't have a problem if an index is greater than You might try using the debugger to see what value is being returned from |
What index value? |
Error is:
|
Ok, so the error is being thrown from There are probably a number of ways this could be handled, but keeping track within mirador/application code of which images have actually been added to the viewer, and what index they are within the |
There is a bug is Mirador 3 that might related to this issue: ProjectMirador/mirador#3585 |
We are loading in manifests that contain images with multiple layers, the
index
value for example is4
(so 5 layers). I have noticed that OSD throws an error when theindex
value is bigger than or equal to the number of layers when loading these in. For us, this is naturally because the layers are loading in asynchronously, and the count is sometimes initially smaller when this function is called, sometimes we do not get the error on a refresh. I have a feeling that something is not quite right.The text was updated successfully, but these errors were encountered: