mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-26 15:16:10 +03:00
Merge pull request #590 from openseadragon/tests
Fixes for viewport tests with collections
This commit is contained in:
commit
7d3dfd810f
@ -287,11 +287,11 @@
|
|||||||
|
|
||||||
for(var i = 0; i < testRects.length; i++){
|
for(var i = 0; i < testRects.length; i++){
|
||||||
var rect = testRects[i].times(viewport.getContainerSize());
|
var rect = testRects[i].times(viewport.getContainerSize());
|
||||||
viewport.resetContentSize(rect);
|
viewport.resetContentSize(rect.getSize());
|
||||||
viewport.update();
|
viewport.update();
|
||||||
propEqual(
|
propEqual(
|
||||||
viewport.contentSize,
|
viewport.contentSize,
|
||||||
rect,
|
rect.getSize(),
|
||||||
"Reset content size correctly."
|
"Reset content size correctly."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@
|
|||||||
viewport.update();
|
viewport.update();
|
||||||
propEqual(
|
propEqual(
|
||||||
viewport.getBounds(),
|
viewport.getBounds(),
|
||||||
new OpenSeadragon.Rect(-1.5,0,4,4),
|
new OpenSeadragon.Rect(0, 1.5, 1, 1),
|
||||||
"Viewport fit a tall image horizontally."
|
"Viewport fit a tall image horizontally."
|
||||||
);
|
);
|
||||||
start();
|
start();
|
||||||
@ -426,7 +426,7 @@
|
|||||||
viewport.update();
|
viewport.update();
|
||||||
propEqual(
|
propEqual(
|
||||||
viewport.getBounds(),
|
viewport.getBounds(),
|
||||||
new OpenSeadragon.Rect(0,0,0.25,0.25),
|
new OpenSeadragon.Rect(0.375, 0, 0.25, 0.25),
|
||||||
"Viewport fit a wide image vertically."
|
"Viewport fit a wide image vertically."
|
||||||
);
|
);
|
||||||
start();
|
start();
|
||||||
|
Loading…
Reference in New Issue
Block a user