These are chat archives for openseadragon/openseadragon

22nd
Sep 2015
Grant Echols
@gechols
Sep 22 2015 22:27
I'm trying to 'switch' the images that are loaded in OSD so I'm calling world.removeAll and then I start calling to OSD.addTiledImage to start adding a different set of images. It seems that there's something else I should be doing because I'm getting an extra world.addItem invoked from inside a callback within OSD. Is there additional 'cleanup' I need to do when switching the image set?
Ian Gilman
@iangilman
Sep 22 2015 22:28
Interesting. Could be a timing issue? What happens if you wait a second after the remove before adding (just for debugging purposes)?
Grant Echols
@gechols
Sep 22 2015 22:29
It could very well be a timing issue because when I debug through the test case it seems to work
I could wait for an event to fire if I knew what event to watch for. I know there's some remove-item events called.
Ian Gilman
@iangilman
Sep 22 2015 22:31
What if you do a setTimeout of 1 ms before adding?
Grant Echols
@gechols
Sep 22 2015 22:31
I'll give it a try and see what happens
Ian Gilman
@iangilman
Sep 22 2015 22:31
cool. Of course it would be great to get to the bottom of it so we don't have to do such workarounds…