These are chat archives for openseadragon/openseadragon
Hi all, I'm trying to 'pin' an image to the corner of a viewer so it remains in place when the viewport is zoomed.
I have two viewers, side by side. The left image I want to pin to the top right; the right image I want to pin to the top left.
For the right image, I do:
var bounds = viewport.getBounds(); var vector = new OpenSeadragon.Point(-bounds.x,-bounds.y); // same as negate() viewport.panBy(vector);
and for the left:
var bounds = viewport.getBounds(); var vector = new OpenSeadragon.Point(bounds.x,-bounds.y); // I'm only flipping the y-coordinate viewport.panBy(vector);
Is there a better way to approach this?