These are chat archives for openseadragon/openseadragon

23rd
Aug 2017
Sriyan Sampath
@ssrajapaksha_twitter
Aug 23 2017 08:30
Hi Guys
I tried viewer.drawer.destroy()
viewer.drawer.reset()
viewer.drawer.update()
to clear the cache and it says those methods are deprecated
and advises to use
viewer.world.resetItems()
viewer.drawer.clear()
viewer.world.draw()
but the cache still remains
it works for new tiles, but still shows the cached tiles for previous zoom levels
Sriyan Sampath
@ssrajapaksha_twitter
Aug 23 2017 08:35
Any help?
Øystein Lygre
@ooystein
Aug 23 2017 12:31
Could you show an example of what you are trying to do in a codepen https://codepen.io/ ?
have you tried viewer.destroy() or viewer.open()?
Ian Gilman
@iangilman
Aug 23 2017 17:22
@ssrajapaksha_twitter @ooystein Yeah, just viewer.open should be enough to flush out the old image and bring in the new one
@pipriles I don't know the details, but yeah, MouseTracker should be able to cut through a lot of that. Sorry you're still having some issues with the combination of things...
@jp887 That sounds like a great idea! You'll have to make a custom animation; our springs won't support a smooth multi-point journey, since they are always ease out only.
Ian Gilman
@iangilman
Aug 23 2017 17:27
To do a custom animation you would simply write something that figured out the zoom/pan coordinates for each frame and then apply that directly to the viewer via viewer.viewport.zoomTo and viewer.viewport.panTo. Pass in true for the immediately flags on both of those functions, and you completely bypass the built-in springs