Fit horizontally and vertically.

This commit is contained in:
nein09 2015-01-16 16:30:54 -08:00
parent 1debca9c41
commit 500d8c2348

View File

@ -286,9 +286,10 @@
viewport.update(); viewport.update();
propEqual( propEqual(
viewport.getBounds(), viewport.getBounds(),
new OpenSeadragon.Point(0,0), new OpenSeadragon.Rect(-1.5,0,4,4),
"Viewport fit a tall image horizontally." "Viewport fit a tall image horizontally."
); );
start();
}; };
viewer.addHandler('open', openHandler); viewer.addHandler('open', openHandler);
viewer.open(TALL_PATH); viewer.open(TALL_PATH);
@ -302,9 +303,10 @@
viewport.update(); viewport.update();
propEqual( propEqual(
viewport.getBounds(), viewport.getBounds(),
new OpenSeadragon.Point(0,0), new OpenSeadragon.Rect(0,0,0.25,0.25),
"Viewport fit a wide image vertically." "Viewport fit a wide image vertically."
); );
start();
}; };
viewer.addHandler('open', openHandler); viewer.addHandler('open', openHandler);
viewer.open(WIDE_PATH); viewer.open(WIDE_PATH);