These are chat archives for openseadragon/openseadragon

7th
Jan 2016
Alexey Tikhonov
@altert
Jan 07 2016 00:00
but if I set collectionMode to true, overlay is shown in top left corner of image and the width/height also seems to be set to zero
Ian Gilman
@iangilman
Jan 07 2016 00:01
Hmm...
I guess it's not really a scenario we considered
For one thing, we don't really have a mechanism for tying an overlay to a particular image, so when the collection mode rearranges things, the overlays would be left behind
Alexey Tikhonov
@altert
Jan 07 2016 00:02
aha so in your m2 demo you've used different mechanism to place overlays?
Ian Gilman
@iangilman
Jan 07 2016 00:03
Yes, in that demo we're using the https://github.com/openseadragon/svg-overlay plugin. But even there, the demo code is moving the overlay to match the location of the image; neither OSD or the plugin take care of that
If you want to use HTML overlays (as built into OSD) rather than SVG, you should still be able to get it to work, but I'd recommend trying viewer.addOverlay after the open is complete, rather than including it at construction time
Alexey Tikhonov
@altert
Jan 07 2016 00:06
viewer.addOverlay produces the same result, but I guess I'd need to manually adjust the position and size of overlay?
Ian Gilman
@iangilman
Jan 07 2016 00:08
Yes, you need to align it manually to the tiled images
But you're saying if you call addOverlay after you get the open event and it's not respecting the values you give it?
Alexey Tikhonov
@altert
Jan 07 2016 00:09
yes
if I add collectionMode:true to overlay.html demo in OpenSeadragon
Ian Gilman
@iangilman
Jan 07 2016 00:10
That's strange
Alexey Tikhonov
@altert
Jan 07 2016 00:10
it's shown collapsed
(and overlay is added there via addOverlay)
Ian Gilman
@iangilman
Jan 07 2016 00:13
Hmm...I can't reproduce it...did you make other changes to that demo? (I've tried on Mac Firefox and Chrome)
The "runtime overlays" demo
thi one
Alexey Tikhonov
@altert
Jan 07 2016 00:17
if I add collectionMode:true after line 24
I'll try with this sample
Ian Gilman
@iangilman
Jan 07 2016 00:21
Ok, I see the problem.
Without collectionMode, the default viewport sizing for the image is 1 unit. With collectionMode, the default viewport sizing for each image is 800 units.
If you add collectionTileSize: 1 to the options, the overlay is sized properly
Ian Gilman
@iangilman
Jan 07 2016 00:26
At any rate, in practice you should just base your overlay size and position on where the images ended up once collectionMode arranged them.
And keep in mind that it's all happening in viewport coordinates...this is handy to have as reference: http://openseadragon.github.io/examples/viewport-coordinates/
Alexey Tikhonov
@altert
Jan 07 2016 00:27
oh cool! thanks. I've missed collectionTileSize option
Ian Gilman
@iangilman
Jan 07 2016 00:28
Yeah, we have a lot of options...
Alexey Tikhonov
@altert
Jan 07 2016 00:28
or actually I've set it to something like 256, or my images in collections were set too far apart
Ian Gilman
@iangilman
Jan 07 2016 00:29
There's also collectionTileMargin
Alexey Tikhonov
@altert
Jan 07 2016 00:30
yes, btw it can't be set to zero, right?
Ian Gilman
@iangilman
Jan 07 2016 00:31
Hmm...looks like that's true...that would be easy enough to fix if you want to write a patch
Alexey Tikhonov
@altert
Jan 07 2016 00:31
I'll try. I'm not yet too familiar with OpenSeadragon code
thanks a lot!
what I'm doing is adding OpenSeadragon support to Resourcespace DAM
there is a Seadragon plugin present, I'm extending its functions and switching to OpenSeadragon (which is wonderful software, btw!)
Ian Gilman
@iangilman
Jan 07 2016 00:33
You'd change this line: https://github.com/openseadragon/openseadragon/blob/808442e016ad1abc6fe46c2c8a98f2348dc2b899/src/world.js#L324 to check for undefined rather than the falsy check it has now
Thank you, glad you like!
I'm new to Resourcespace DAM...looks cool, and a great place for zooming!
Alexey Tikhonov
@altert
Jan 07 2016 00:36
oh yes, especially for collections. I'll be sure to give a link when I get plugin to publishable state
Ian Gilman
@iangilman
Jan 07 2016 00:36
Yes please! We can help spread the word