These are chat archives for openseadragon/openseadragon

22nd
Feb 2016
Matthias Guth
@ChiSamurai
Feb 22 2016 09:13
Hi all, how can I best get the boundingBox of the Image Content in OSD. I would need the top left pixel coordinates of the image container - the offset OSD div-container <-> image-content....
foobarable
@foobarable
Feb 22 2016 12:20
@sickrandir I just found some issues with the angular-openseadragon module and collection mode.
@sickrandir because it uses viewport.viewportToImageCoordinates
sickrandir
@sickrandir
Feb 22 2016 15:10
@foobarable thank you for telling me. Right now I'm using it for simple things and it works. A problem I see is that wraps everything in a directive and so it's not possible to call OSD methods in the controller. I'm thinking of creating a patch for angular-openseadragon to extract a bit of logic and put it into a service. Then inject the service in the existing directive and my controllers as needed.
@foobarable what do you think?
foobarable
@foobarable
Feb 22 2016 15:14
@sickrandir i'm a the same point right now. the things angular-openseadragon exports into the parent scope are just not enough
foobarable
@foobarable
Feb 22 2016 15:30
@sickrandir I rarely have seen directives depending on services though yet. Correct me if I'm wrong.
sickrandir
@sickrandir
Feb 22 2016 15:32
@foobarable well, about angular I'm certainly not an expert. However, it can be done and it seems that someone also encourages it: http://madewithenvy.com/ecosystem/articles/2015/wrapping-third-party-libraries-in-angular-js/
foobarable
@foobarable
Feb 22 2016 15:40
@sickrandir Thanks for the article, i'll read through it. Im not sure yet what I will do with the module. Maybe i can find a clean way arround.
sickrandir
@sickrandir
Feb 22 2016 15:43
@foobarable Ok. Let's be in touch. I'll update if I come up with something.
foobarable
@foobarable
Feb 22 2016 15:45
thanks
Ian Gilman
@iangilman
Feb 22 2016 18:44
@altert Do you mean for the DZI info or do you mean for each individual tile?
For DZI info you can skip the XHR by passing the info directly. For individual tiles we're already not using XHR (as far as I know)
@ChiSamurai What coordinate system do you want the bounds in? It's certainly possible; we have a number of coordinate conversion functions
Alexey Tikhonov
@altert
Feb 22 2016 22:52
@iangilman for DZI (I'm trying to make offline version for use on IOS, and xmlhttprequest is not working with file:// there)
Ian Gilman
@iangilman
Feb 22 2016 23:40
@altert Cool. Well, one way is just to load the DZI file however you want outside of OSD and then digest the data yourself and pass it into OSD
Alexey Tikhonov
@altert
Feb 22 2016 23:49
thanks! will definitely try it