-
Notifications
You must be signed in to change notification settings - Fork 0
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
Uncaught (in promise) Error: Index bigger than number of layers. #25
Comments
This is actually a bug in OpenSeaDragon: openseadragon/openseadragon#1843 |
To fix this, Mirador would have to update OpenSeaDragon to version 3.0.0, I think. Currently Mirador uses version 2.4.2. |
This requires a PR and update to Mirador, so this is won't fix for now. |
Tested the newest version of OSD (4.0.1) locally and this does not resolve the issue. |
I have found out the real reason overriding does nothing. It is because Mirador uses both the minified version of OSD and the package version of OSD. Overriding merely patches one part, so therefore some functions are unavailable. If I override the OSD package in the build, I can use the function by customising the code locally and injecting values into osdConfig. However trying to access the viewer in Mirador always points to the minified version, which is locked to version 2.x of OSD. Even then, Ian at OSD suggests that the function is only available by having access to the namespace of OSD in Mirador i.e. OpenSeadragon, which I do not even know is possible. |
I was premature. Updating the minified version does nothing for this... |
I can see clearly how this is happening. The number of layers in state at the beginning of rendering is 3, but the index property either doesn't exist or is higher than the number of layers. Eventually all the layers do get defined in state, but only when layers have been put onto state by something else. To me this indicates a bug in Mirador. |
To fix this, maybe we add a saga that listens to the initiation of Mirador, and we put in the layers ourselves... |
There is a bug somewhere that causes this to appear in the dev console in a browser:
Uncaught (in promise) Error: Index bigger than number of layers.
The text was updated successfully, but these errors were encountered: