-
Notifications
You must be signed in to change notification settings - Fork 15
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
Mirador shows no image after using of the mirador-image-tools #38
Comments
Hi, I encountered the same problem.
Is there any progress on this issue ? Thank you |
Thank you for posting this issue! We were able to recreate this issue and started investigating at community call on 10/28. Notes:
|
Hey there, |
Hi, the problem is still there. Unsupported rotation: NaN [index.html:13441:25]<...> index.html)
overrideMethod <...>/index.html:13441
onUpdateViewport <...>/main.js:85
getHandler <...>/2.main.js:6
raiseEvent <...>/2.main.js:6
(Async: FrameRequestCallback)
/*...*/ Best |
I fiddled around with this a while longer and tried to reproduce the bug in mirador dev setup to look at it a little closer, i.e. having setup of the mirador repo developing it with webpack serve (using the start scripts) and using the plugin as a preconfigured one there. In this setup the problem does not arise. I don't know what this means exactly, but made me think of some build/dependency issues as the source of the bug. Best |
I had some time again to look into it. Concerning the last comment testing a little bit longer showed, problems in the other setup are the same. Yet with the help of react dev tools in the browser I saw that the viewerConfig seems to be (part) of the problem. Leafing through a manifest in the viewer there are several points, when after changing the page the viewerConfig Prop of the OSD-viewer element and the image tools element becomes If in such a situation we change a setting in the image tools the viewerConfig gets set with only the image tool config part and breaks the viewer, now leafing forward or backward, doesn't change the config leaving it broken. |
Tracked the problem a little further. It seems to be related to the way the viewer handles state in the reducers. Normally the default values for the viewerConfig come from a updateViewport-Function. During a page change (e.g. clicking previous/next page buttons) a setCanvas action first resets the config, without the "defaults", only in another state change action triggered by the updateViewport-Func. the defaults are set. In some circumstances the order is changed and there is not no viewport update after the setCanvas action and the viewerConfig stays null, leading to the problem described above. It's only reproducible if a plugin is installed. I tried it on the 3.x release branch of the mirador viewer. Cheers... |
We are having the same problem. Not sure if the open pull for 4.0 fixes these issues, but probably we want to tackle a fix as a community? If not sadly this plugin is not very useful and leads to user frustration |
I just tested the mirador4-compat-clean branch; the problem still exists there, but after that I tried installing Mirador locally with the latest commit ProjectMirador/mirador@c2943e6 from the master branch, et voilà, the changes that are necessary to get it to run made the problem disappear. (Which isn't that surprising because the If anyone wants to reproduce this:
|
@lutzhelm great. Can confirm, the resizeObserver actually does the trick.At least for me, changing the line in this plugin was not needed, just adding react-sizeme as a dependency. Thanks |
I tried both approaches and found that they fix the unshown image bug. However they introduce a new one as the original sizing is no longer working (size.width always remains undefined) In a pr on the mirador4-compat-clean branch, I refactored the component to handle the |
@fstoe thanks. this is great! |
For reproducing - use the mirador-image-tools.netlify.app instance.
The text was updated successfully, but these errors were encountered: