These are chat archives for openseadragon/openseadragon

23rd
Aug 2016
Antoine Vandecreme
@avandecreme
Aug 23 2016 10:40

So if I've got a 1,000 pixel wide viewer with 100 pixel left and right margins, the old getBounds would have returned 800 width, but the new one will return 1,000?

Correct

How about the new setBounds?

I am actually not sure what it was doing before

My understanding is that viewportMargins is (should) only (be) relevant when going home, but maybe I missed something here?
Ian Gilman
@iangilman
Aug 23 2016 16:09
Man, I've been saying setBounds instead of fitBounds lately... you know what I mean though.
@avandecreme viewportMargins are meant to make the viewer behave as if it had a smaller space to display in, and yet allow the image(s) to bleed out over the "edge"
The purpose is let's say you have a toolbar, and you want it to hover over the image, but you don't want it to obscure any of the image by default
So yes, it should affect homeBounds, but it should have the same effect on fitBounds
... so it seems it should also affect getBounds, so the fitBounds/getBounds relationship isn't broken
The idea is for it to seem like the viewer boundary is what's inside the margins (i.e. the 800 px in my example above), even though what's outside the margins (i.e. the 100 px on each side) is visible
Ian Gilman
@iangilman
Aug 23 2016 16:14
It was a feature request from @aeschylus who can possibly fill in more info if need be
aeschylus
@aeschylus
Aug 23 2016 16:26
Ian described it exactly as I would. Another way I think of it is that "home bounds" are asymmetrical.
Ian Gilman
@iangilman
Aug 23 2016 16:29
How do you mean?
Ian Gilman
@iangilman
Aug 23 2016 16:35
@aeschylus ^
aeschylus
@aeschylus
Aug 23 2016 16:36
Just that when you zoom out "all the way", the image isn't necessarily centred.
There might be a bottom margin or more space to the left, for overlaid menus.
Ian Gilman
@iangilman
Aug 23 2016 16:38
Gotcha
COLABORATI
@COLABORATI
Aug 23 2016 22:54
@iangilman I did not do this, just found it because I always need to ctrl-u when seeing an interesting web project :)
Ian Gilman
@iangilman
Aug 23 2016 22:55
@COLABORATI Gotcha... well thanks for sharing it!