These are chat archives for openseadragon/openseadragon

21st
Jun 2017
Mark Allen Matney, Jr.
@markmatney
Jun 21 2017 20:51
Hi, I am getting the following error message: [Viewport.viewportToImageZoom] is not accurate with multi-image. Can someone help me understand why this is the case? Also, if I can guarantee that all of the images on the canvas are always the same size, and will always be in the same position, is this really an issue?
Sean Nichols
@seanich
Jun 21 2017 20:54
If all the images are always the same size it won't be an issue, but you'll continue to get the warning. You should use TileImage.viewportToImageZoom to avoid the warning.
If you want a reference to the nth TiledImage you can use Viewer.world.getItemAt(n)
Mark Allen Matney, Jr.
@markmatney
Jun 21 2017 20:59
Thanks!
Sean Nichols
@seanich
Jun 21 2017 20:59
No problem :)
Matt D
@dephora
Jun 21 2017 23:21
@iangilman Just thought I'd let you know your Codepen examples are all broken (no tilesource)
Ian Gilman
@iangilman
Jun 21 2017 23:22
@dephora Yes... I'm not sure why! Nothing has changed as far as I know (except that now they're broken). I haven't had a chance to debug it yet
Matt D
@dephora
Jun 21 2017 23:23
https issue?
Ian Gilman
@iangilman
Jun 21 2017 23:27
I don't think so... take https://codepen.io/iangilman/pen/bdgWBz for instance... I'm using // for my URLs, so they should be https when the page is https.
...but even if I change it to explicitly https:// it still doesn't work
It looks like this is the line that's giving the error: https://github.com/openseadragon/openseadragon/blob/master/src/viewer.js#L2252
...which implies that it's having trouble figuring out that the object I gave it as a tile source is a DZI.
Ian Gilman
@iangilman
Jun 21 2017 23:32
The odd thing is that there's no new OSD version since those codepens were working; the OSD code hasn't changed (and the codepen code hasn't changed)
Matt D
@dephora
Jun 21 2017 23:32
I don't know how github pages works but your example-images is empty and everything else after is throwing 404s
Ian Gilman
@iangilman
Jun 21 2017 23:34
I think it's fine when you point at an actual file, it's just that we're giving the directory to OSD (and it figures out what files to do)
...but that can't be the issue, since if you look in the developer console, OSD isn't even trying to load a single image
Matt D
@dephora
Jun 21 2017 23:41
Yeah I'm at a loss, maybe it will sort itself out
Ian Gilman
@iangilman
Jun 21 2017 23:43
Unfortunately it's been like that for a while :(
Actually, looks like I can get it to reproduce locally...
Still not sure why though
Matt D
@dephora
Jun 21 2017 23:45
Weird
Ian Gilman
@iangilman
Jun 21 2017 23:49
Okay, you inspired me to dig enough to figure out the fix! https://codepen.io/iangilman/pen/bdgWBz is working now :)
Matt D
@dephora
Jun 21 2017 23:50
Haha that was quick. I inspire people to do wonderful things!
Ian Gilman
@iangilman
Jun 21 2017 23:50
The issue is line 3... it needs to be xmlns: "http://schemas.microsoft.com/deepzoom/2008", with the http. I guess maybe Codepen went through and automatically changed all http to https or something? The problem is that OSD is explicitly looking for the http, so it didn't recognize it with the https (and it's just being used as a marker; we don't actually load that page)
So... I'll fix the other codepens (probably tomorrow though) and we should update OSD to not care about http vs https there
@dephora Yes, good job with the inspiring! :)
Matt D
@dephora
Jun 21 2017 23:54
That's funny, I had not even thought about them changing all http to https but yeah that makes sense.