These are chat archives for openseadragon/openseadragon

6th
Apr 2016
Antoine Vandecreme
@avandecreme
Apr 06 2016 18:31
I have a bunch of tile sources to add to my viewer. I can't think of a way to match a given 'add-item' event back to its corresponding tile source object (except than waiting for the 'add-item' event to fire between each insertion). Am I missing something?
Ian Gilman
@iangilman
Apr 06 2016 18:36
@avandecreme Yes, the success option in addTiledImage is exactly for that purpose
Antoine Vandecreme
@avandecreme
Apr 06 2016 18:36
Yeah, just noticed that. Thanks!
I was using open so far.
Ian Gilman
@iangilman
Apr 06 2016 18:36
I think you can even use it with open
... since open calls addTiledImage under the hood
Antoine Vandecreme
@avandecreme
Apr 06 2016 18:37
Yeah, but I pass an array to open, I don't see how that would work
Ian Gilman
@iangilman
Apr 06 2016 18:39
viewer.open([
    {
        tileSource: ...,
        success: ...
    },
    {
        tileSource: ...,
        success: ...
    }
]);
Antoine Vandecreme
@avandecreme
Apr 06 2016 18:39
Ha yes! Thanks
Ian Gilman
@iangilman
Apr 06 2016 18:41
That's what's meant by "tiledImage specifier" in the docs for open http://openseadragon.github.io/docs/OpenSeadragon.Viewer.html#open ... but I understand it's not terribly clear!
That's why we need #898
Antoine Vandecreme
@avandecreme
Apr 06 2016 18:48
Well, it is not that I didn't understand but rather that I was looking for a way to identify an 'add-item' event. But yeah, an example page would help.
Ian Gilman
@iangilman
Apr 06 2016 18:49
Cool
Ian Gilman
@iangilman
Apr 06 2016 18:58
And yeah, maybe we could add the original tileSource to the add-item event so you can connect them up. It would have to be whatever the user passed, and not the full TileSource that we create