I have an app I'm translating from xslt-generated html to existDB, and I'd like to include a Mirador viewer.The example (modified for my purposes as shown below) works fine with a static html page, and if I take the html generated from my exist application and save it as a static html file then and put it in there it works fine as well. But if I attempt to use it within my exist app I get a very unstable version of the viewer, wherein any attempt to interact with it results in it eventually throwing an error (which I'll show below under the code). The minified code is not particularly helpful for troubleshooting purposes, so I was wondering if this is a situation others have run into and if so what they did to get around it. The germane bit of code is as follows, using the default Harvard manifest from the github example for testing:
<div id="viewer" allowfullscreen="allowfullscreen">
<script src="https://unpkg.com/mirador@latest/dist/mirador.min.js"></script>
<div id="mirador"></div>
<script type="text/javascript">
const mirador = Mirador.viewer({
"id": "mirador",
"manifests": {
"https://iiif.lib.harvard.edu/manifests/drs:48309543": {
"provider": "Harvard University"
}
},
"windows": [
{
"loadedManifest": "https://iiif.lib.harvard.edu/manifests/drs:48309543",
"canvasIndex": 2,
"thumbnailNavigationPosition": 'far-bottom'
}
]
});
</script>
</div>
The error I'm getting on load is as follows:
TypeError: this.gridRef.current is null
value ThumbnailNavigation.js:35
React 2
unstable_runWithPriority scheduler.production.min.js:19
React 4
unstable_runWithPriority scheduler.production.min.js:19
React 4
Redux 68
Ks createPluggableStore.js:22
e MiradorViewer.js:20
viewer init.js:15
<anonymous> index:15
react-dom.production.min.js:209:194
React 9
unstable_runWithPriority scheduler.production.min.js:19
React 4
Redux 68
Ks createPluggableStore.js:22
e MiradorViewer.js:20
viewer init.js:15
<anonymous> index:15
And any attempt to interact with the canvas results in a "too much recursion" error:
InternalError: too much recursion
c getScrollParent.js:27
G setupEventListeners.js:11
G mirador.min.js:2 -- THIS REPEATS 123 TIMES --
react-dom.production.min.js:209:194
React 9
os
payload
gi
Fa
Es
vc
gc
sc
Xo
unstable_runWithPriority scheduler.production.min.js:19
React 5
qo
Xo
Yo
nc
ya
o useControlled.js:38
we Tooltip.js:273
current Tooltip.js:306
(Async: setTimeout handler)
Oe Tooltip.js:305
React 12
s
p
v
v
st
it
ct
ht
L
F
Jt
Qt
unstable_runWithPriority scheduler.production.min.js:19
React 11
Xt
Zt
Kt
gt
un
es
bc
vc
gc
sc
Xo
unstable_runWithPriority scheduler.production.min.js:19
React 2
qo
Xo
W scheduler.production.min.js:17
onmessage scheduler.production.min.js:14
(Async: EventHandlerNonNull)
<anonymous> scheduler.production.min.js:13
Webpack 15
o
<anonymous>
o
<anonymous>
o
<anonymous>
o
<anonymous>
o
<anonymous>
o
<anonymous>
<anonymous>
<anonymous>
<anonymous>