These are chat archives for openseadragon/openseadragon

15th
Dec 2016
Luca Lianas
@lucalianas
Dec 15 2016 08:45
Hi everyone, I'm working on a plug-in for OpenMicroscopy's OMERO platform to integrate openseadragon with it (you can find the stable version of code here https://github.com/crs4/ome_seadragon). I wanted to add a security layer by implementing authentication\authorisation using OAuth2 but I really don't know how to make it work :(
I'm fetching the TileSource data as JSON and passing it to the viewer but I can't fetch image's tiles if they are protected by OAuth
@iangilman any suggestion about that?
Ian Gilman
@iangilman
Dec 15 2016 18:07
@lucalianas You'll probably be interested in this patch then: openseadragon/openseadragon#1055
Does that seem like it'll cover your needs?
(at least be a foundation for supporting OAuth)
Patrick Liechty
@patrickliechty
Dec 15 2016 20:35
@iangilman I have a better handle on things. But I have a question. I create an overlay and I have to use image coordinates in collecitonMode to get it to show up. Why don't viewport coordinates work? Here is a code pen: http://codepen.io/patrickliechty/pen/QGJBWV
Ian Gilman
@iangilman
Dec 15 2016 21:06
@patrickliechty It's always using viewport coordinates, but the relationship between the image and the overlay size depend on how you size the image. If you don't explicitly size the image it gets a width of 1. In this new codepen, the collectionTileSize of 1024 means your images are going to be 1024 wide (or 1024 tall if it's a portrait orientation image). Of course in the former case (image width of 1 in viewport coordinates), an overlay that covers half of the image would have to be 0.5 wide whereas in the latter (image width of 1024 in viewport coordinates), an overlay that covers half the image would have to be 512 wide.
Remember, viewport coordinates are however you set them up. Collection mode sets them up for you based on your collectionTileSize.
Patrick Liechty
@patrickliechty
Dec 15 2016 21:55
ok, thanks for the explanation. That makes sense
Ian Gilman
@iangilman
Dec 15 2016 22:10
Excellent :)