These are chat archives for openseadragon/openseadragon

Mar 2017
Mar 17 2017 10:02

Hi all. I have a use case where I need the viewer to be in one browser window and navigator in another window and have the ability to navigate the viewer.

This is the approach I followed - I saved the instance of the viewer in window object and when navigator is opened in new window, it uses this global object to gain access to the viewer object in main window and move it around.It is working fine in Chrome and Firefox. But in IE 11, it results in out of stack trace error. On debugging, I could see that $.isPlainObject() is getting called recursively resulting in the stack error.

Any idea what could be the possible reason for this issue or is there a better approach to this use case?

Sample Code -

Mar 17 2017 10:33
@iangilman You could also use the following view, whatever you like more:
Ian Gilman
Mar 17 2017 17:26
@foobarable Awesome! I've added it to the list of things to add openseadragon/site-build#159 ... no one's gotten around to adding any of them to the site in a while, though; feel free to make a PR if you'd like!
@vin-dev That's pretty wild! I'm not sure what's causing the problem though. $.isPlainObject never calls itself, so it's weird that it would be getting called recursively...
A very different approach would be to use localStorage to manage the communication between the two windows and implement the navigator fresh with just a standard viewer. You could steal code from the existing navigator, which is already built on top of the viewer code
Ian Gilman
Mar 17 2017 17:34
I wrote an example (not using OSD) of the localStorage trick a while ago: (unfortunately the demo site is down at the moment)
...or maybe even using the global object like you already do, but building out a fresh navigator instead of using the existing one
Or of course you could debug why OSD is blowing the stack on IE11 in this situation. I don't have any initial thoughts, but I might be able to kibitz as you get into it and find clues