thatcher / openseadragon

This project has moved to its new github organization at github.com/openseadragon, please join us!
http://openseadragon,github.com/
37 stars 14 forks source link

Support for opening AJAX responses #6

Closed acdha closed 11 years ago

acdha commented 12 years ago

Currently this feature technically exists but doesn't appear to be useful because you can call viewer.openDzi(xhrData) but doing so will not set the tile url and there's no way short of writing a custom tile source to do so because the only case in which a tile URL value is passed through is when it's calculated from the DZI URL:

https://github.com/thatcher/openseadragon/blob/master/src/openseadragon.js#L1206-1216

There also appears to be a bug in error handling as well:

https://github.com/thatcher/openseadragon/blob/master/src/openseadragon.js#L1234 and https://github.com/thatcher/openseadragon/blob/master/src/openseadragon.js#L1240 imply that the finish function will set the error value but instead https://github.com/thatcher/openseadragon/blob/master/src/openseadragon.js#L1222 simply returns null.

thatcher commented 11 years ago

Working on this. I think adding a certain amount of error handling, especially fixing the implied support, is critical so I'll elevate this. It's a generally important issue in terms of both network and client accessibility requirements. I'm always on the side of graceful failure, which isnt possible without the correct api feedback.

We may not choose to provide every callback jquery does for errors but one of the most important new features openseadragon adds is 'ilnine configuration' to allow the server to request the image resource details an render the html page template rendering, and javascript configuration, without an additional ajax request.

This is particularly powerful for avoiding ajax requirements in openseadragon as a web client.

I'll ping this thread when I can determine this is finally fixed in a commit and please feel free to agrue the point if you think I dont get it.

thatcher commented 11 years ago

please see https://github.com/openseadragon/openseadragon/issues/15