Skip to content
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

Issue with eXist and simple embedding #3566

Open
MedievalMatt opened this issue Aug 14, 2022 · 0 comments
Open

Issue with eXist and simple embedding #3566

MedievalMatt opened this issue Aug 14, 2022 · 0 comments

Comments

@MedievalMatt
Copy link

MedievalMatt commented Aug 14, 2022

I'm attempting to use the simple embedded javascript version of Mirador, called via unpkg, within an eXist application. The code works fine as straight HTML, but within eXist it initially instantiates but I get the following error if I attempt to interact with the canvas at all:

index.js:209 RangeError: Maximum call stack size exceeded
    at c (getScrollParent.js:27:31)
    at G (setupEventListeners.js:11:7)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
os @ index.js:209
n.callback @ index.js:226
mi @ index.js:131
us @ index.js:212
Oc @ index.js:255
t.unstable_runWithPriority @ factoryWithThrowingShims.js:19
qo @ index.js:122
wc @ index.js:248
sc @ index.js:239
(anonymous) @ index.js:123
t.unstable_runWithPriority @ factoryWithThrowingShims.js:19
qo @ index.js:122
Xo @ index.js:123
Yo @ index.js:122
nc @ index.js:230
ya @ index.js:163
(anonymous) @ useControlled.js:38
we @ MenuItem.js:273
(anonymous) @ MenuItem.js:306
setTimeout (async)
(anonymous) @ MenuItem.js:305
s @ index.js:14
p @ index.js:14
(anonymous) @ index.js:14
v @ index.js:15
st @ index.js:52
it @ index.js:51
ct @ index.js:52
ht @ index.js:56
L @ index.js:287
F @ index.js:19
Jt @ index.js:70
Qt @ index.js:69
t.unstable_runWithPriority @ factoryWithThrowingShims.js:19
Xt @ index.js:68
getScrollParent.js:27 Uncaught RangeError: Maximum call stack size exceeded
    at c (getScrollParent.js:27:31)
    at G (setupEventListeners.js:11:7)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)
    at G (mirador.min.js:2:1038206)

This is using the Harvard manifest provided in the examples and following how the html is structured there. It's about as simple as the html code can get within eXist:

   <script src="https://unpkg.com/mirador@latest/dist/mirador.min.js"/>
   <div id="mirador"/>
   <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>

The issue seems to be with react-dom.production.min.js from within the Webpack created for the unpkg site. Is there different way I should be approaching integration with the eXist site? If not, why are the multiple calls being generated to the point that it errors out and hangs my browser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant